I just downloaded version 1.12. But when I now use my widgets in VSCode there is an error when using ArcGIS Maps SDK for Javascript modules.
Thus resulting in no intellisense when using modules from ArcGIS Maps SDK for Javascript.
The code still works, but I would like to have no errors (and intellisense 🙂 )
What to do?
Solved! Go to Solution.
Found a solution.
Added the following line to compilerOptions.paths in tsconfig.json
{
...
"compilerOptions": {
...
"paths": {
"arcgis-charts": ["jimu-ui/arcgis-charts"],
"calcite-components": ["jimu-ui/calcite-components/index"],
--> "esri/*": ["node_modules/@arcgis/core/*"] <---
}
},
...
}
I am not sure if this is the correct way to do it, but it doesn't seem to break anything when running, and it removes the underlines missing modules and adds intellisense again.
So I am happy 😃
Found a solution.
Added the following line to compilerOptions.paths in tsconfig.json
{
...
"compilerOptions": {
...
"paths": {
"arcgis-charts": ["jimu-ui/arcgis-charts"],
"calcite-components": ["jimu-ui/calcite-components/index"],
--> "esri/*": ["node_modules/@arcgis/core/*"] <---
}
},
...
}
I am not sure if this is the correct way to do it, but it doesn't seem to break anything when running, and it removes the underlines missing modules and adds intellisense again.
So I am happy 😃
Hi @Robert_van_Gilst It's great you figured it out! This is the patch that does actually the same: https://github.com/Esri/arcgis-experience-builder-sdk-resources/tree/master/patches/1.12/patch1/arcg...
I'm not sure if it can run without that, but do you have this declaration in your widget manifest.json file:
"dependency": "jimu-arcgis"
Thanks for the input @KamilNovák but I have the declaration.
Another solution is to download the 4.27 TypeScript definition file from Esri's GitHub page: https://github.com/Esri/jsapi-resources/blob/main/4.x/typescript/arcgis-js-api.d.ts, and adding it to the /client/types folder