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

318
4
Jump to solution
06-14-2021 05:52 AM
JohnRegan
New Contributor II

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
Frequent 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
New Contributor II

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

0 Kudos
ReneRubalcava
Frequent 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

JohnRegan
New Contributor II

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