-
Notifications
You must be signed in to change notification settings - Fork 202
Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed #1124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You're using a custom typescript version and not the one that came with var loophole = require("loophole")
module.exports = loophole.allowUnsafeNewFunction(function() {
return require("typescript")
}) Then specify a full path to this module. |
Edit: No I'm not. Nevermind. |
I'm still seeing this. |
My workaround was doing:
var loophole = require("loophole");
// ...
global.ts = loophole.allowUnsafeNewFunction(() => require(typescriptPath));
"dependencies": {
// ...
"loophole": "1.1.0"
}
# Not sure if this is the correct way of doing it as I know nothing about node.
$ cd ~/.atom/packages/atom-typescript/node_modules
$ npm i loophole |
Is there any legit fix for this in the pipeline? Is atom-typescript deprecated? |
This workaround doesn't work for me... Just to clarify, this is the new makeTypeScriptGlobal.js that I have, in case I made csome mistake:
|
@conan747, it seems like you are updating |
Yeah, that was it. Thanks man! |
After version 11.x I believe this issue is now fixed. |
After update 10.1.12 I am getting:
I reverted the changes from this PR #1117 locally and now things work fine.
The text was updated successfully, but these errors were encountered: