bug: Refused to evaluate a string as JavaScript because 'unsafe-eval'
See original GitHub issuemonaco-editor version: 0.24.0 Browser: Chrome/Firefox OS: Playground code that reproduces the issue:
- Enable CSP policy without having
'unsafe-eval'
enabled. - Load the editor
EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not
an allowed source of script in the following Content Security Policy directive...
at eval (<anonymous>)
at workerMain.js:2
at editor.main.js:2
If you need more details about it please let me know.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Chrome extension compiled by Webpack throws `unsafe-eval ...
How can I permit the use of eval() in my code (because Webpack uses this to generate source maps)?. javascript · google-chrome ·...
Read more >Refused to evaluate a string as JavaScript because ... - GitHub
Description: When loading the library, the browser throws an error: Uncaught EvalError: Refused to evaluate a string as JavaScript because ' ...
Read more >ERROR EvalError: Refused to evaluate a string as JavaScript ...
To work around, we need to turn on the 'unsafe-eval' option - but that is basically disabling the Content Security Policy, so not...
Read more >Chrome: script-src eval: Refused to evaluate a string as ...
There are 2 solutions how to fix the "refused to evaluate a string as JavaScript" eval error, less safe and more safe. Before...
Read more >[Reports Only] ,Refused to evaluate a string as Javascript ...
Hi Tableau,. I am experiencing error on : [Report Only] Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed ......
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
Why not always use importScripts?
@bhoomij The initial issue is resolved. If you get a CSP error, please create a new issue with complete repro steps. You can also test using the nightly builds e.g.
monaco-editor@0.31.0-dev.20211201
.