1000ch / atom-csso

Minify CSS with CSSO

Home Page:https://atom.io/packages/csso

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an al...

vinicius73 opened this issue · comments

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.6.0
System: Ubuntu 14.04.4
Thrown From: csso package, v1.3.0

Stack Trace

Uncaught 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 /home/vreis/.atom/packages/csso/node_modules/csso/lib/compressor/index.js:74

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 compress (/home/vreis/.atom/packages/csso/node_modules/csso/lib/compressor/index.js:74:74)
    at minify (/home/vreis/.atom/packages/csso/node_modules/csso/lib/index.js:95:9)
    at Object.minifyStylesheet [as minify] (/home/vreis/.atom/packages/csso/node_modules/csso/lib/index.js:116:12)
    at minify (/home/vreis/.atom/packages/csso/index.js:25:20)
    at atom-workspace.<anonymous> (/home/vreis/.atom/packages/csso/index.js:35:60)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/opt/atom/resources/app.asar/src/command-registry.js:260:29)
    at /opt/atom/resources/app.asar/src/command-registry.js:3:61
    at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/opt/atom/resources/app.asar/node_modules/command-palette/lib/command-palette-view.js:183:32)
    at CommandPaletteView.module.exports.SelectListView.confirmSelection (/opt/atom/resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)
    at space-pen-div.atom.commands.add.core:confirm (/opt/atom/resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/opt/atom/resources/app.asar/src/command-registry.js:260:29)
    at /opt/atom/resources/app.asar/src/command-registry.js:3:61
    at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/opt/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:570:16)
    at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/opt/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:378:22)
    at WindowEventHandler.module.exports.WindowEventHandler.handleDocumentKeydown (/opt/atom/resources/app.asar/src/window-event-handler.js:97:36)
    at HTMLDocument.<anonymous> (/opt/atom/resources/app.asar/src/window-event-handler.js:3:61)

Commands

     -2:02.0 core:backspace (atom-text-editor.editor.is-focused)
     -1:58 autocomplete-plus:cancel (atom-text-editor.editor.is-focused.autocomplete-active)
     -1:56.8.0 snippets:next-tab-stop (atom-text-editor.editor.is-focused)
     -1:56.8.0 snippets:expand (atom-text-editor.editor.is-focused)
     -1:55.3.0 core:undo (atom-text-editor.editor.is-focused)
     -1:54.9.0 core:move-right (atom-text-editor.editor.is-focused.autocomplete-active)
     -1:54.5.0 core:move-left (atom-text-editor.editor.is-focused)
  3x -1:54.1.0 core:select-left (atom-text-editor.editor.is-focused)
  7x -1:53.1.0 core:backspace (atom-text-editor.editor.is-focused)
     -1:50.6.0 core:save (atom-text-editor.editor.is-focused)
     -1:42.4.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -1:35.1.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -1:35.1.0 csso:execute (atom-text-editor.editor)
     -0:09.3.0 command-palette:toggle (atom-text-editor.editor.is-focused)
     -0:04.2.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:04.2.0 csso:minify (atom-text-editor.editor)

Config

{
  "core": {
    "autoHideMenuBar": true,
    "closeEmptyWindows": false,
    "disabledPackages": [
      "gulp-manager",
      "atom-jade",
      "autocomplete-php",
      "gulp-control",
      "atom-autocomplete-php",
      "php-twig",
      "git-log",
      "bottom-dock",
      "language-vue-component",
      "drunken-php",
      "emmet",
      "atom-typescript",
      "editorconfig",
      "atom-beautify",
      "docblockr",
      "flex-tool-bar",
      "language-blade",
      "merge-conflicts",
      "tool-bar"
    ],
    "themes": [
      "one-light-ui",
      "chester-atom-syntax"
    ]
  }
}

Installed Packages

# User
atom-ternjs, v0.13.2
autoclose-html, v0.23.0
chester-atom-syntax, v0.1.1
csso, v1.3.0
exception-reporting, v0.37.0
file-icons, v1.6.18
jshint, v1.8.3
language-vue, v0.9.0
linter, v1.11.4
linter-jscs, v3.4.9
linter-jshint, v2.0.3
linter-php, v1.2.0
metrics, v0.53.1
minimap, v4.21.0
pigments, v0.26.0
sync-settings, v0.7.2
vue-snippets, v0.4.2

# Dev
No dev packages

Do you still get an error after reinstall?

I could reproduced, sorry.
This is fixed in v2.0.0, please update!