Refreshing Website Causes No Map Display and Numerous Console Errors

628
1
Jump to solution
02-02-2021 11:40 AM
developerarce
New Contributor III

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?

0 Kudos
1 Solution

Accepted Solutions
JoeFaulkner
New Contributor

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.

View solution in original post

0 Kudos
1 Reply
JoeFaulkner
New Contributor

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.

0 Kudos