Error in package with JSDOM dependancy


#1

I’m getting the error. Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self'". This appears in the setImmediate dependancy of jsdom - i tried to use loophole, but it didn’t work. Don’t really know what to do from here…


#2

JSDOM is used in node normally, right? Atom uses normal node. Maybe you should post an issue on the JSDOM npm module you are using.


#3

So turns out that JSDOM uses setImmediate package, which contains a new Function() call that is forbidden by CSP. So i needed allow Function from loophole rather than allow eval. opened issue with setImmediate about whether that call is really needed or not.