Jgod
October 28, 2017, 4:17am
1
I upgraded from Cocos Creator 1.5.2 to 1.6.2 and I’m getting this build error, so web preview doesn’t work, even on re-build (through build-menu).
Failed to load resource: the server responded with a status of 404 (Not Found) :7456/preview-scripts/__node_modules/es5-ext/string/#/contains/index.js Failed to load resource: the server responded with a status of 404 (Not Found)
Uncaught Error: ["preview-scripts/__node_modules/es5-ext/array/#/e-index-of.js","preview-scripts/__node_modules/es5-ext/string/#/contains/index.js","preview-scripts/__node_modules/es5-ext/string/#/contains/is-implemented.js","preview-scripts/__node_modules/es5-ext/string/#/contains/shim.js"]
I don’t want to have to create a new Cocos Creator project. Is there a way to “force” it to use the latest versions of Cocos files?
Jgod
October 28, 2017, 4:27am
2
I did a “recompile” in the Browser Preview and now it’s changed to:
downloader.js:63 GET http://localhost:7456/preview-scripts/__node_modules/es5-ext/array/ net::ERR_ABORTED downloadScript @ downloader.js:63 133.Downloader.handle @ downloader.js:316 133.Downloader._handleLoadQueue @ downloader.js:298 (anonymous) @ downloader.js:318 loadHandler @ downloader.js:53 downloader.js:63 GET http://localhost:7456/preview-scripts/__node_modules/es5-ext/string/ net::ERR_ABORTED downloadScript @ downloader.js:63 133.Downloader.handle @ downloader.js:316 133.Downloader._handleLoadQueue @ downloader.js:298 (anonymous) @ downloader.js:318 loadHandler @ downloader.js:53 CCGame.js:401 Uncaught Error: ["preview-scripts/__node_modules/es5-ext/array/#/e-index-of.js","preview-scripts/__node_modules/es5-ext/string/#/contains/index.js","preview-scripts/__node_modules/es5-ext/string/#/contains/is-implemented.js","preview-scripts/__node_modules/es5-ext/string/#/contains/shim.js"] at CCLoader.<anonymous> (CCGame.js:401) at CCLoader.js:241 at utils.js:85
Update: I have created a new Cocos Creator project and copied all my assets and scripts over to it, to no avail.
Jgod
October 28, 2017, 6:49am
3
Something I noticed: the only files from __node_modules it fails on are those with # in the filename.
Jgod
August 7, 2018, 2:21pm
5
This bug still seems to be present in v1.10 and v2.0