Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Cannot read property 'uri' of null

Hi All,
We are using Oracle JET to display PDF in Model Dialogue popup. It went to deploy starting of this year and it was working great but all of sudden it stopped working and we are not sure when it was broken.
When I debug the code find that we are keep on getting "Cannot read property 'uri' of null". No clue why I am getting this error.
We are loading Oracle JET from CDN.

uide me function _getCDNPath(paths) {
    var cdnPath = "https://static.oracle.com/cdn/jet/";
    var ojPath = "v8.2.0/default/js/";
    var thirdpartyPath = "v8.2.0/3rdparty/";
    var keys = Object.keys(paths);
    var newPaths = {};

    function _isoj(key) {
        return (key.indexOf('oj') === 0 && key !== 'ojdnd');
    }
    keys.forEach(function (key) {
        newPaths[key] = cdnPath + (_isoj(key) ? ojPath : thirdpartyPath) + paths[key];
    });
    return newPaths;
}

requirejs.config({
    // Path mappings for the logical module names
    paths: _getCDNPath({
        'knockout': 'knockout/knockout-3.5.0',
        'jquery': 'jquery/jquery-3.4.1.min',
        'jqueryui-amd': 'jquery/jqueryui-amd-1.12.1.min',
        'promise': 'es6-promise/es6-promise.min',
        'ojs': 'min',
        'ojL10n': 'ojL10n',
        'ojtranslations': 'resources',
        'signals': 'js-signals/signals.min',
        'text': 'require/text',
        'hammerjs': 'hammer/hammer-2.0.8.min',
        'ojdnd': 'dnd-polyfill/dnd-polyfill-1.0.0.min',
        'touchr': 'touchr/touchr',
        'customElements': 'webcomponents/custom-elements.min'
    }),
    // Shim configurations for modules that do not expose AMD
    shim: {
        'jquery': {
            exports: ['$']
        }
    }
});


Could someone please help me how to resolve this problem.
TIA,
Narendra

Comments
Post Details
Added on Nov 9 2020
6 comments
1,673 views