Select to view content in your preferred language

ArcGIS Javascript upgrade from 4.12 to 4.19 issue - using ES5 modules

1465
4
Jump to solution
06-14-2021 05:52 AM
JohnRegan
Emerging Contributor

Hi, I have upgraded to 4.19 from 4.12 and started switching over from using esri-loader to ES5 modules. I am getting the below error though and it lists probably all of the ArcGIS objects available in the library. Any pointers about what to do about this would be much appreciated? 

ERROR in node_modules/@arcgis/core/interfaces.d.ts(1,1): error TS6200: Definitions of the following identifiers conflict with those in another file: HashMap, HashMap, IPromise, Accessor, ItemCallback, ItemCompareCallback.... and loads more

0 Kudos
1 Solution

Accepted Solutions
ReneRubalcava
Honored Contributor

If you had the @types/arcgis-js-api installed to use with esri-loader, uninstall them as the ESM build comes with types already. Could be the two are conflicting.

View solution in original post

4 Replies
AndyGup
Esri Regular Contributor

Hi @JohnRegan this sounds like a configuration issue. Do you have a basic github repo you can share that reproduces the issue?

0 Kudos
JohnRegan
Emerging Contributor

Hi Andy, thanks for the reply - unfortunately the repo is on company git repo so not possbile

0 Kudos
ReneRubalcava
Honored Contributor

If you had the @types/arcgis-js-api installed to use with esri-loader, uninstall them as the ESM build comes with types already. Could be the two are conflicting.

JohnRegan
Emerging Contributor

Thanks Rene, this appears to have solved it - I removed the line below from package.json

"@types/arcgis-js-api""4.18.0"
0 Kudos