[Bug] The sample browser-esm-parcel is not working
See original GitHub issueReproducible in vscode.dev or in VS Code Desktop?
- Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
- Not reproducible in the monaco editor playground
Monaco Editor Playground Code
The sample browser-esm-parcel is not working.
Steps to reproduce:
git clone git@github.com:microsoft/monaco-editor.git
cd monaco-editor
cd samples/browser-esm-parcel
npm install
npm start
Open browser to http://localhost:1234/ to view the web page served Parcel’s dev server.
Open the dev console.
Actual Behavior
An empty box appears in the web page where the Monaco Editor should be rendered.
The following error is output to the dev console:
Uncaught TypeError: Cannot set property marked of #<Object> which has only a getter
at index.975ef6c8.js:117651:24
at index.975ef6c8.js:115678:72
at index.975ef6c8.js:115682:7
at Object.jVSjm.@parcel/transformer-js/src/esmodule-helpers.js (index.975ef6c8.js:117664:3)
at newRequire (index.975ef6c8.js:71:24)
at localRequire (index.975ef6c8.js:84:35)
at Object.5JIxC../dom.js (index.975ef6c8.js:113756:17)
at newRequire (index.975ef6c8.js:71:24)
at localRequire (index.975ef6c8.js:84:35)
at Object.6TtqN.../../../../base/browser/markdownRenderer.js (index.975ef6c8.js:113600:27)
Expected Behavior
I expect to see Monaco Editor working in the web page and no errors in the dev console.
Additional Context
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:9
- Comments:7
Top Results From Across the Web
Parcel 2 RC
One place where this was not true in Parcel v1 was the way Parcel handled ... Screenshot of an error message showing "Browser...
Read more >webbrowser — Convenient web-browser controller — Python ...
Usage example: ... This module does not work or is not available on WebAssembly platforms ... Exception raised when a browser control error...
Read more >Browser support
Targeting such a wide range of browsers is challenging because they do not support all features of modern browsers. You compensate by loading...
Read more >package.json
These are helpful for people who encounter issues with your package. ... If a url is provided, it will be used by the...
Read more >How to Bundle a Web App with Parcel.js
If this happens, you can try refreshing the browser. If you're still having a problem, stop your server from running by pressing CTRL+C...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I had a similar issue when trying to use
monaco-editor
in another project. I was able to get it working by specifying monaco-editor version0.31.0
. Likewise, this sample works after specifyingmonaco-editor
version0.31.0
in the sample’spackage.json
.One difference I notice is that the latest
monaco-editor
uses version4.0.12
of marked, while the older monaco-editor that works uses version3.0.8
version of marked.I think it’s a transitive dependency, and I haven’t dug deeper into it.
I got same issue. Version downgrade was helped me: