Update to 4.25

1432
6
02-22-2023 02:29 AM
Vakhtang_Zubiashvili
Frequent Contributor

Hi guys.

 

i use API 4.24, now i want to update it on 4.25, but when i add 4.25 i get error mentioned in attached image.

What might be cause? What i have to change?

I have proxy setup for WMS, might it be cause?

 

Thanks advance

0 Kudos
6 Replies
Noah-Sager
Esri Regular Contributor

Hi @Vakhtang_Zubiashvili, those look like dojo errors, but it's difficult to diagnose without a simplified reproducible test-app. Have you looked at the breaking changes for 4.25 and seen if any of those are affecting you?
https://developers.arcgis.com/javascript/latest/breaking-changes/#425

 

ReneRubalcava
Honored Contributor

In addition, no dojo libs are part of the 4.25 CDN anymore.

https://developers.arcgis.com/javascript/latest/release-notes/#removal-of-non-esri-packages-from-cdn

The release notes show how you can use 4.24 CDN dojo libs if needed, but they no longer ship with ongoing releases.

Vakhtang_Zubiashvili
Frequent Contributor

Thanks Rene, but i could not find any topic . Can you please point me exact topic? 

0 Kudos
Andy_Morgan
Regular Contributor

Apologies for borrowing this thread, but this question seems relevant:

I cannot find any definitive answer or documentation when it comes to relying on DojoConfig for package loading. I'm in the middle of migrating a large ASP.NET / ArcGIS Javascript application from 4.21 to 4.27. I'm really hoping DojoConfig will be supported throughout the remainder of the 4.x lifecycle to buy me a few years of doing the following. It's mainly for my own folders.

 

let locationPath = location.pathname.replace(/\/[^/]+$/, '');
window.dojoConfig = {
    async: true, parseOnLoad: false, packages: [
        { name: "appJavascript", location: locationPath + "/js" },
        { name: "appJavascriptClasses", location: locationPath + "/js/classes" },
        { name: "appHtml", location: locationPath + "/html" },
        { name: "dojo", location: "../../4.21/dojo" },
        { name: "dijit", location: "../../4.21/dijit" }
    ],
    has: {
        "esri-native-promise": true
    }
}

 

The last two lines for /dojo and /dijit are really just examples of possibilities. I'm actually trying to cleanse my code of any Dojo references and only use plain vanilla Javascript. This must remain in AMD design, not ES modules. If I'm able to rid the code of all Dojo classes, I'd still need to make use of DojoConfig which appears to be necessary for the Require.js part of the SDK. Unless someone knows how to replace DojoConfig with vanilla Javascript...? I could not piece together a solution without loading require.js and using the "data-main" attribute, which I'd rather avoid. 

 

0 Kudos
Noah-Sager
Esri Regular Contributor

It got moved when 4.26 was released, here is the new link:

https://developers.arcgis.com/javascript/latest/4.25/#removal-of-non-esri-packages-from-cdn

 

MarioEstevez
Emerging Contributor

Could someone provide an example of how to use dojo dgrid with the latest js API (4.27)? Thanks!

 

0 Kudos