Not sure what is going on, but I am using ES Modules to load arcgis. Every time I refresh via the browser, I receive numerous console errors and no map display. I will display the first few errors, but not all of them.
Refused to execute script from 'http://localhost:3000/app/user/assets/esri/core/workers/RemoteClient.js' because its MIME type ('text/html') is not executable.
[esri.core.workers] ErrorEvent {isTrusted: true, message: "Uncaught NetworkError: Failed to execute 'importSc…sri/core/workers/RemoteClient.js' failed to load.", filename: "blob:http://localhost:3000/f2214ea2-a5c4-40d8-a0a8-c68b3a5689ba", lineno: 1, colno: 1747, …}
[esri.widgets.Widget] widget-intl:locale-error esri.widgets.Attribution s {name: "intl:message-bundle-error", details: {…}, message: "Errors occurred while loading "esri/widgets/Attribution/t9n/Attribution""}
It seems as though, packages aren't getting loaded on a refresh?
Solved! Go to Solution.
For anyone reading this in the future, I had the same problem and found the answer here. In particular, I had to change config.assetsPath from './assets' to '/assets'. The issue being that './assets' resolves to a different location if you refresh the page when you are not at the root of the website.
For anyone reading this in the future, I had the same problem and found the answer here. In particular, I had to change config.assetsPath from './assets' to '/assets'. The issue being that './assets' resolves to a different location if you refresh the page when you are not at the root of the website.