mananshah99 / atom-minjs

Minifies a JS file on save in Atom.
https://atom.io/packages/atom-minjs
MIT License
0 stars 1 forks source link

Failed to load the atom-minjs package #6

Open camel-chased opened 9 years ago

camel-chased commented 9 years ago

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.2.0-beta0 System: Ubuntu 15.10 Thrown From: atom-minjs package, v0.2.12

Stack Trace

Failed to load the atom-minjs package

At 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'".

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 (native)
    at Object.<anonymous> (/home/cml/.atom/packages/atom-minjs/node_modules/uglify-js/tools/node.js:22:1)
    at Module._compile (module.js:434:26)
    at Object.defineProperty.value [as .js] (/usr/share/atom-beta/resources/app.asar/src/compile-cache.js:190:21)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/home/cml/.atom/packages/atom-minjs/lib/minjs.coffee:1:9)
    at Object.<anonymous> (/home/cml/.atom/packages/atom-minjs/lib/minjs.coffee:1:1)
    at Module._compile (module.js:434:26)
    at Object.defineProperty.value [as .coffee] (/usr/share/atom-beta/resources/app.asar/src/compile-cache.js:190:21)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Package.module.exports.Package.requireMainModule (/usr/share/atom-beta/resources/app.asar/src/package.js:661:34)
    at /usr/share/atom-beta/resources/app.asar/src/package.js:115:28
    at Package.module.exports.Package.measure (/usr/share/atom-beta/resources/app.asar/src/package.js:92:15)
    at Package.module.exports.Package.load (/usr/share/atom-beta/resources/app.asar/src/package.js:106:12)
    at PackageManager.module.exports.PackageManager.loadPackage (/usr/share/atom-beta/resources/app.asar/src/package-manager.js:434:14)
    at PackageManager.module.exports.PackageManager.activatePackage (/usr/share/atom-beta/resources/app.asar/src/package-manager.js:511:30)
    at /usr/share/atom-beta/resources/app.asar/node_modules/settings-view/lib/package-manager.js:444:29
    at exit (/usr/share/atom-beta/resources/app.asar/node_modules/settings-view/lib/package-manager.js:73:16)
    at triggerExitCallback (/usr/share/atom-beta/resources/app.asar/src/buffered-process.js:213:47)
    at /usr/share/atom-beta/resources/app.asar/src/buffered-process.js:220:18
    at Socket.<anonymous> (/usr/share/atom-beta/resources/app.asar/src/buffered-process.js:98:18)
    at emitOne (events.js:82:20)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:469:12)

Commands

  4x -7:25.5.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -7:22.7.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -3:15.3.0 core:save (atom-text-editor.editor.is-focused)
     -1:13 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:35.1.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -0:34.6.0 core:confirm (atom-text-editor.editor.mini.is-focused)

Config

{
  "core": {
    "themes": [
      "atom-dark-ui",
      "monokai-flat"
    ],
    "autoHideMenuBar": true
  }
}

Installed Packages

# User
atom-minjs, v0.2.12
docblockr, v0.7.3
editor-background, v1.2.13
jsformat, v0.9.0
minimap, v4.16.0
monokai-flat, v1.0.1

# Dev
No dev packages
ThinkCats commented 8 years ago

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.3.2 System: Mac OS X 10.10.5 Thrown From: atom-minjs package, v0.2.12

Stack Trace

Failed to load the atom-minjs package

At 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'".

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 (native)
    at Object.<anonymous> (/Users/wanglei/.atom/packages/atom-minjs/node_modules/uglify-js/tools/node.js:22:1)
    at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .js] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Object.<anonymous> (/Users/wanglei/.atom/packages/atom-minjs/lib/minjs.coffee:1:9)
    at Object.<anonymous> (/Users/wanglei/.atom/packages/atom-minjs/lib/minjs.coffee:1:1)
    at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30)
    at Object.defineProperty.value [as .coffee] (/Applications/Atom.app/Contents/Resources/app.asar/src/compile-cache.js:208:21)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
    at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27)
    at Package.module.exports.Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:663:34)
    at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:115:28
    at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:92:15)
    at Package.module.exports.Package.load (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:106:12)
    at PackageManager.module.exports.PackageManager.loadPackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:438:14)
    at PackageManager.module.exports.PackageManager.loadPackages (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:390:14)
    at AtomEnvironment.module.exports.AtomEnvironment.startEditorWindow (/Applications/Atom.app/Contents/Resources/app.asar/src/atom-environment.js:682:21)
    at module.exports (/Applications/Atom.app/Contents/Resources/app.asar/src/initialize-application-window.js:28:10)
    at setupWindow (file:///Applications/Atom.app/Contents/Resources/app.asar/static/index.js:86:5)
    at window.onload (file:///Applications/Atom.app/Contents/Resources/app.asar/static/index.js:41:9)

Commands

Config

{
  "core": {
    "themes": [
      "one-light-ui",
      "one-light-syntax"
    ]
  }
}

Installed Packages

# User
atom-minjs, v0.2.12
environment, v1.1.1
go-config, v0.3.1
go-find-references, v1.2.3
java-importer, v1.4.1
pretty-json, v0.4.1
terminal-plus, v0.14.5

# Dev
No dev packages
findthebug commented 8 years ago

Error still exist in v1.5.3

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 (native) at Object. (/Users/home/.atom/packages/atom-minjs/node_modules/uglify-js/tools/node.js:22:1) at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30) at Object.defineProperty.value as .js at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27) at Object. (/Users/home/.atom/packages/atom-minjs/lib/minjs.coffee:1:9) at Object. (/Users/home/.atom/packages/atom-minjs/lib/minjs.coffee:1:1) at Module._compile (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:103:30) at Object.defineProperty.value as .coffee at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Module.require (module.js:365:17) at require (/Applications/Atom.app/Contents/Resources/app.asar/src/native-compile-cache.js:50:27) at Package.module.exports.Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:720:27) at /Applications/Atom.app/Contents/Resources/app.asar/src/package.js:116:28 at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:92:15) at Package.module.exports.Package.load (/Applications/Atom.app/Contents/Resources/app.asar/src/package.js:106:12) at PackageManager.module.exports.PackageManager.loadPackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:445:14) at PackageManager.module.exports.PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app.asar/src/package-manager.js:524:30) at /Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/package-manager.js:444:29 at exit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/settings-view/lib/package-manager.js:73:16) at triggerExitCallback (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:213:47) at ChildProcess. (/Applications/Atom.app/Contents/Resources/app.asar/src/buffered-process.js:235:18) at emitTwo (events.js:87:13) at ChildProcess.emit (events.js:172:7) at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)