crucialfelix / atom-supercollider

SuperCollider development environment for Atom.io
MIT License
84 stars 12 forks source link

6to5 (babel) is blocking atom-supercollider from being activated #32

Closed crucialfelix closed 9 years ago

crucialfelix commented 9 years ago

6to5 is run on all source files to transpile ES 6 to ES 5

Something inside of express is causing an error with unsafe javascript eval. But atom-supercollider does not even use that functionality from supercolliderjs at all.

Maybe I have to factor out the server stuff into a separate package, or maybe I just need to add some flags somewhere.

/Users/spasmo/.atom/packages/supercollider/node_modules/supercolliderjs/node_modules/express/node_m…:414 wrapfunction/Users/spasmo/.atom/packages/supercollider/node_modules/supercolliderjs/node_modules/express/node_m…:156 (anonymous function)module.js:475 Module._compile/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/6to5.js:138 loadFilemodule.js:370 Module.loadmodule.js:325 Module._loadmodule.js:380 Module.requiremodule.js:399 require/Users/spasmo/.atom/packages/supercollider/node_modules/supercolliderjs/node_modules/express/lib/ut…:16 (anonymous function)module.js:475 Module._compile/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/6to5.js:138 loadFilemodule.js:370 Module.loadmodule.js:325 Module._loadmodule.js:380 Module.requiremodule.js:399 require/Users/spasmo/.atom/packages/supercollider/node_modules/supercolliderjs/node_modules/express/lib/ap…:15 (anonymous function)module.js:475 Module._compile/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/6to5.js:138 loadFilemodule.js:370 Module.loadmodule.js:325 Module._loadmodule.js:380 Module.requiremodule.js:399 require/Users/spasmo/.atom/packages/supercollider/node_modules/supercolliderjs/node_modules/express/lib/ex…:7 (anonymous function)module.js:475 Module._compile/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/6to5.js:138 loadFilemodule.js:370 Module.loadmodule.js:325 Module._loadmodule.js:380 Module.requiremodule.js:399 require/Users/spasmo/.atom/packages/supercollider/node_modules/supercolliderjs/node_modules/express/index.…:2 (anonymous function)module.js:475 Module._compile/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/6to5.js:138 loadFilemodule.js:370 Module.loadmodule.js:325 Module._loadmodule.js:380 Module.requiremodule.js:399 require/Users/spasmo/.atom/packages/supercollider/node_modules/supercolliderjs/lib/nodejs/bridge.js:39 (anonymous function)module.js:475 Module._compile/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/6to5.js:138 loadFilemodule.js:370 Module.loadmodule.js:325 Module._loadmodule.js:380 Module.requiremodule.js:399 require/Users/spasmo/.atom/packages/supercollider/node_modules/supercolliderjs/index.js:6 (anonymous function)module.js:475 Module._compile/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/6to5.js:138 loadFilemodule.js:370 Module.loadmodule.js:325 Module._loadmodule.js:380 Module.requiremodule.js:399 require/Users/spasmo/.atom/packages/supercollider/lib/repl.coffee:14 (anonymous function)/Users/spasmo/.atom/packages/supercollider/lib/repl.coffee:271 (anonymous function)module.js:475 Module._compile/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/node_modules/coffee-cash/lib/coffee-…:67 requireCoffeeScriptmodule.js:370 Module.loadmodule.js:325 Module._loadmodule.js:380 Module.requiremodule.js:399 require/Users/spasmo/.atom/packages/supercollider/lib/controller.coffee:7 (anonymous function)/Users/spasmo/.atom/packages/supercollider/lib/controller.coffee:395 (anonymous function)module.js:475 Module._compile/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/node_modules/coffee-cash/lib/coffee-…:67 requireCoffeeScriptmodule.js:370 Module.loadmodule.js:325 Module._loadmodule.js:380 Module.requiremodule.js:399 requiresupercollider.coffee:3 (anonymous function)supercollider.coffee:3 (anonymous function)module.js:475 Module._compile/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/node_modules/coffee-cash/lib/coffee-…:67 requireCoffeeScriptmodule.js:370 Module.loadmodule.js:325 Module._loadmodule.js:380 Module.requiremodule.js:399 require/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/package.js:651 module.exports.Package.requireMainModule/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/package.js:251 module.exports.Package.activateConfig/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/package.js:232 module.exports.Package.activateNow/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/package.js:710 (anonymous function)/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/node_modules/event-kit/lib/emitter.js:82 module.exports.Emitter.emit/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/command-registry.js:224 module.exports.CommandRegistry.handleCommandEvent/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/command-registry.js:3 (anonymous function)/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/command-registry.js:156 module.exports.CommandRegistry.dispatch/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/window-event-handler.js:69 (anonymous function)events.js:116 emit
/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/package.js:241 Failed to activate package named 'supercollider' 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: "script-src 'self'".

    at Function.wrapfunction (/Users/spasmo/.atom/packages/supercollider/node_modules/supercolliderjs/node_modules/express/node_modules/depd/index.js:414:5)
    at Object.<anonymous> (/Users/spasmo/.atom/packages/supercollider/node_modules/supercolliderjs/node_modules/express/node_modules/send/index.js:156:47)
    at Module._compile (module.js:475:26)
    at Object.loadFile [as .js] (/Volumes/Coochie/jdownloader/Atom-2.app/Contents/Resources/app/src/6to5.js:138:21)
    at Module.load (module.js:370:32)
    at Function.Module._load (module.js:325:12)
    at Module.require (module.js:380:17)
    at require (module.js:399:17)
    at Object.<anonymous> (/Users/spasmo/.atom/packages/supercollider/node_modules/supercolliderjs/node_modules/express/lib/utils.js:16:12)
    at Module._compile (module.js:475:26)
crucialfelix commented 9 years ago

fixed. supercolliderjs no longer contains express

it could've just used node's own http but its better to keep it simple