Prettier-atom: Failed to activate the prettier-atom package

Created on 13 Apr 2019  路  11Comments  路  Source: prettier/prettier-atom

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.36.0 x64
Electron: 4.1.1
OS: linux 5.0.7-arch1-1-ARCH
Thrown From: prettier-atom package 0.56.4

Stack Trace

Failed to activate the prettier-atom 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 /packages/prettier-atom/node_modules/prettier/index.js:40036:21
    at createCommonjsModule (/packages/prettier-atom/node_modules/prettier/index.js:192:35)
    at /packages/prettier-atom/node_modules/prettier/index.js:39843:18)
    at /packages/prettier-atom/node_modules/prettier/index.js:41849:3)
    at Module._compile (/usr/lib/atom/src/native-compile-cache.js:87:30)
    at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:235:23)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)
    at Module.require (internal/modules/cjs/loader.js:640:17)
    at require (/usr/lib/atom/src/native-compile-cache.js:47:27)
    at /packages/prettier-atom/dist/helpers/getPrettierInstance.js:4:25)
    at /packages/prettier-atom/dist/helpers/getPrettierInstance.js:20:3)
    at Module._compile (/usr/lib/atom/src/native-compile-cache.js:87:30)
    at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:235:23)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)
    at Module.require (internal/modules/cjs/loader.js:640:17)
    at require (/usr/lib/atom/src/native-compile-cache.js:47:27)
    at /packages/prettier-atom/dist/helpers/index.js:9:29)
    at /packages/prettier-atom/dist/helpers/index.js:20:3)
    at Module._compile (/usr/lib/atom/src/native-compile-cache.js:87:30)
    at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:235:23)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)
    at Module.require (internal/modules/cjs/loader.js:640:17)
    at require (/usr/lib/atom/src/native-compile-cache.js:47:27)
    at /packages/prettier-atom/dist/statusTile/updateStatusTileScope.js:3:56)
    at /packages/prettier-atom/dist/statusTile/updateStatusTileScope.js:12:3)
    at Module._compile (/usr/lib/atom/src/native-compile-cache.js:87:30)
    at Object.value [as .js] (/usr/lib/atom/src/compile-cache.js:235:23)
    at Module.load (internal/modules/cjs/loader.js:602:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
    at Function.Module._load (internal/modules/cjs/loader.js:533:3)

Commands


Non-Core Packages

atom-beautify 0.33.4 
atom-ide-ui 0.13.0 
color-picker 2.3.0 
docblockr 0.13.7 
editorconfig 2.4.0 
emmet 2.4.3 
file-icons 2.1.31 
ide-css 0.3.2 
ide-flowtype 0.24.0 
ide-java 0.8.3 
ide-json 0.2.1 
ide-php 0.7.18 
ide-typescript 0.8.0 
language-babel 2.85.0 
language-ejs 0.4.0 
language-markdown 0.29.0 
language-postcss 1.3.1 
language-stylus 0.2.0 
language-vue 0.24.0 
minimap 4.29.9 
open-in-browser 0.5.2 
pigments 0.40.2 
prettier-atom 0.56.4 
split-diff 1.6.0 
duplicate

Most helpful comment

This seems to be an issue again

All 11 comments

Yeah, it accurs no matter installed from atom setting -> install pannel or git clone from github repo.

I've tried to checkout prev version v0.56.0 but all the same.

Give me a hand. I need it to pretty my js file.

this is still occurring for me. can anyone help me solving this ?

See #493, you need to use an older version of Prettier as the new version had a regression.

This seems to be an issue again

disabled this and also linter! seriously atom packages became so buggy nowadays! no testing!!

There's no way to integration test Atom unfortunately, but as you can see we've got many unit tests and good code coverage. Bug is related to Prettier not prettier-atom, btw. Nothing I can do about that.

This seems to be an issue again, again

endless error

And again.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kentcdodds picture kentcdodds  路  5Comments

axhamre picture axhamre  路  4Comments

ryanpcmcquen picture ryanpcmcquen  路  3Comments

jjwyse picture jjwyse  路  5Comments

erbridge picture erbridge  路  3Comments