Home >Web Front-end >JS Tutorial >Why am I getting 'Uncaught SyntaxError: Cannot use import statement outside a module' when importing ES6 modules in ArcGIS JSAPI?
When attempting to use Spatial Illusions to draw military symbols on a map using ArcGIS JSAPI 4.12, one may encounter the error "Uncaught SyntaxError: Cannot use import statement outside a module" upon importing milsymbol.js. The root of this issue lies in the fact that ECMAScript 6 (ES6) modules, which use the import keyword, require the