My ArcGIS JavaScript API app kept throwing 404 errors retrieving resources online with errors like these:
So I'm trying to download and run arcgis/core file locally.
I've set the asset path:
esriConfig.assetsPath = "assets";
Now I'm getting errors like these:
404 - http://localhost:4200/assets/esri/widgets/Attribution/t9n/Attribution_en.json http://localhost:4200/assets/esri/widgets/Attribution/t9n/Attribution.json
Errors occurred while loading "esri/widgets/Attribution/t9n/Attribution"
"Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'http://localhost:4200/assets/esri/core/workers/RemoteClient.js' failed to load."
I could find all of these files under node_modules.
What have I missed?
@MichaelWen_Timmons typically 404 errors indicate something is not configured correctly. Verify the assets were actually copied: https://developers.arcgis.com/javascript/latest/get-started-npm/#local-assets.
Please provide a minimal reproduction sample. Here's our troubleshooting guide for future reference.