question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fails on save with EvalError with version 0.32.0

See original GitHub issue

After upgrading to 0.32.0 there is the following error on file save:

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

Atom version: 1.17.2
prettier-atom version: 0.32.0
prettier version: 1.4.1
prettier-eslint version: 6.2.3
prettier-atom configuration: {
  "formatOnSaveOptions": {
    "enabled": true,
    "respectEslintignore": true,
    "showInStatusBar": false,
    "scopes": [
      "source.js",
      "source.jsx",
      "source.js.jsx",
      "source.babel",
      "source.js-semantic",
      "text.html.basic",
      "text.html.vue"
    ],
    "excludedGlobs": [],
    "whitelistedGlobs": []
  },
  "prettierOptions": {
    "singleQuote": true,
    "trailingComma": "all",
    "bracketSpacing": true,
    "semi": true,
    "useTabs": false,
    "jsxBracketSameLine": false,
    "printWidth": 80,
    "tabWidth": "auto",
    "parser": "babylon"
  },
  "useEslint": true,
  "silenceErrors": false,
  "useEditorConfig": true,
  "prettierEslintOptions": {
    "prettierLast": false
  }
}

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12

github_iconTop GitHub Comments

1reaction
darahakcommented, Jun 3, 2017

@nfcampos As I suggested in my previous message, your local prettier may be used instead of the one bundled with prettier-atom. If that’s the case, you should update prettier in your project’s dependencies. See https://github.com/prettier/prettier-atom/pull/104

PS: To avoid flooding a thread, please consider editing your messages instead 😃

0reactions
robwisecommented, Jun 5, 2017

Doing this forces the prettier version to be the most up-to-date. For some reason, your prettier version was the older, buggy one, and prettier-atom was picking it up out of the node_modules folder.

Read more comments on GitHub >

github_iconTop Results From Across the Web

EvalError - JavaScript - MDN Web Docs - Mozilla
The EvalError object indicates an error regarding the global eval() function. ... compatibility with earlier versions of the specification.
Read more >
Chrome extension compiled by Webpack throws `unsafe-eval ...
i was getting this error whenever i changed mode to development , there was no error when using production , so i added...
Read more >
liquid-fire - UNPKG
isJQuery) {\n throw new Error(\"Velocity: IE8 and below require jQuery to be loaded ... */\n /* If a prefixed version of the property...
Read more >
Diff - third_party/rust - fuchsia Git repositories
cargo/5093] + +Misc +---- +- [The second edition of "The Rust Programming Language" ... 0.32.0 (registry+https://github.com/rust-lang/crates.io-index)", ...
Read more >
CPAN distributions for Perl version 5.31.3
Report listings of distributions and authors from reports submitted by the CPAN Testers community, who automatically black box test submissions to Perl's ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found