[BUG] Toggling code editor fails on current development build
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, react
- Domain
- frontend
Research direction
Start in WickCodeEditor.jsx and inspect package.json, then reproduce the failure by running the development build and opening the code editor. Verify that the JavaScript worker loads from the configured public path and that toggling the editor completes without the importScripts console error.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- JavaScript
- Stars
- 51
- Forks
- 20
- Avg merge
- 14d 12h
- Merged PRs (30d)
- 3
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Candlestickers/Candlestick
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Candlestickers/Candlestick#142 ·
-
`Wick.Script` class Openenhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
Candlestickers/Candlestick#215 · 2 comments ·
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Candlestickers/Candlestick#213 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 65/100
Candlestickers/Candlestick#212 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 32/100
Candlestickers/Candlestick#207 · 7 comments ·
All issues in Candlestickers/Candlestick
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·
-
client-controller-update ta-bot-triage team-money-movement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MetaMask/metamask-mobile#36594 ·