Error in package with JSDOM dependancy


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…


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.


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.