Describe the bug
If you start up a new dev server (or load up https://candlestickers.app/test/), and open the code editor, you get this console error:
Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'http://localhost:3000/static/js/worker-javascript.js' failed to load.
(anonymous) @ index.js:35
(anonymous) @ index.js:35
(anonymous) @ Editor.jsx:217
Editor.jsx:218 Error Details: {error: "Uncaught NetworkError: Failed to execute 'importSc…0/static/js/worker-javascript.js' failed to load.", url: 'blob:http://localhost:3000/16c863ac-f036-47c3-bdfc-cc44a9451e3b', line: 1}
note: line numbers may be a bit off, but Editor.jsx:217 is window.onerror = function (error, url, line) {/*...*/} in the constructor and index.js:35 is ReactDOM.render(\<Editor \/\>)
To reproduce
Steps to reproduce the behavior:
- Make sure you are running the test build
- Open the code editor
- See error in console
Expected behavior
Code editor toggles cleanly.
Editor version
Candlestick only, on the development branch
Device
- Lenovo AIO Desktop
- Windows 11
- Microsoft Edge
Do you have a suggested solution to this issue?
I fixed it in my Rolldown migration PR by doing: ace.config.set('basePath', import.meta.env.VITE_PUBLIC_URL + 'ace-workers/'); in WickCodeEditor.jsx and also adding "copy-ace-workers": "shx mkdir -p public/ace-workers && shx cp node_modules/ace-builds/src-noconflict/worker-javascript.js public/ace-workers/worker-javascript.js" as a script in package.json
Describe the bug
If you start up a new dev server (or load up https://candlestickers.app/test/), and open the code editor, you get this console error:
Uncaught NetworkError: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'http://localhost:3000/static/js/worker-javascript.js' failed to load.
(anonymous) @ index.js:35
(anonymous) @ index.js:35
(anonymous) @ Editor.jsx:217
Editor.jsx:218 Error Details: {error: "Uncaught NetworkError: Failed to execute 'importSc…0/static/js/worker-javascript.js' failed to load.", url: 'blob:http://localhost:3000/16c863ac-f036-47c3-bdfc-cc44a9451e3b', line: 1}
note: line numbers may be a bit off, but Editor.jsx:217 is
window.onerror = function (error, url, line) {/*...*/}in the constructor and index.js:35 isReactDOM.render(\<Editor \/\>)To reproduce
Steps to reproduce the behavior:
Expected behavior
Code editor toggles cleanly.
Editor version
Candlestick only, on the development branch
Device
Do you have a suggested solution to this issue?
I fixed it in my Rolldown migration PR by doing:
ace.config.set('basePath', import.meta.env.VITE_PUBLIC_URL + 'ace-workers/');in WickCodeEditor.jsx and also adding"copy-ace-workers": "shx mkdir -p public/ace-workers && shx cp node_modules/ace-builds/src-noconflict/worker-javascript.js public/ace-workers/worker-javascript.js"as a script in package.json