Prettier extension does not work #265
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
code-serverversion: v1.32.0-282- OS Version: Ubuntu 18.04.1 LTS in AWS EC2
Description
After installing the Prettier extension, it is not loaded according to VS Code -> Output panel
Found following errors in the Chrome Deverloper Tools -> Console:
VM5645 webview-pre.js:378 Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-lI7FtpaE7cBnMCxYJFcftk1y+Kd3aGDm9OKs5qP5uf4='), or a nonce ('nonce-...') is required to enable inline execution.
webview-pre.js:378 Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-lI7FtpaE7cBnMCxYJFcftk1y+Kd3aGDm9OKs5qP5uf4='), or a nonce ('nonce-...') is required to enable inline execution.
cb2232.bundle.js:60 Activating extension 'esbenp.prettier-vscode' failed: Cannot find module 'prettier'.
cb2232.bundle.js:45 [Extension Host] Activating extension 'esbenp.prettier-vscode' failed: Cannot find module 'prettier'. (at Object.showMessage (eval at exports.requireModule (/usr/local/bin/code-server:468:27660), <anonymous>:177866:37))
cb2232.bundle.js:45 [Extension Host] Activating extension `esbenp.prettier-vscode` failed: Cannot find module 'prettier' (at newlyActivatingExtension._host.actualActivateExtension.then (eval at exports.requireModule (/usr/local/bin/code-server:468:27660), <anonymous>:177722:25))
Steps to Reproduce
- Start self-hosted code-server (v1.32.0-282) in Ubuntu 18.04.1 LTS in AWS EC2
- Navigate to it from my Mac using Chrome, e.g., https://10.0.x.x:8888/
- Open Extensions tab -> Install Prettier
- Open Chrome Developer Tools -> Console and saw the above errors.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Activity
kylecarbs commentedon Mar 17, 2019
Will fix. cc: @foresthoffman
schrej commentedon Mar 25, 2019
After getting ESLint to work, prettier works fine (I'm using the ESLint integration of prettier).
I installed it by copying it from my Windows machine to
~/.local/share/code-server/extensionsand am using version 1.8.1.njbraun commentedon Mar 26, 2019
Console:
schrej commentedon Mar 26, 2019
@njbraun Install it on your local machine. Make sure to wait untill the dependencies have been installed (i think
npm installruns in the background at some point), just wait until the node_modules folder fills up. Then copy the whole thing to your server (I recommend zipping it to copy if you don't want to wait forever).foresthoffman commentedon Mar 26, 2019
I've just repackaged the prettier extension, so in about an hour, it should be good to go.
rafaelsorto commentedon Mar 28, 2019
Hi guys, I can confirm this issue is still present on release 1.408-vsc1.32.0
Thank you for your time and effort into building code-server!
AriPerkkio commentedon Apr 5, 2019
Found one work-around for this.
Install prettier plugin from VS code and run following.
For some reason npm install is not ran when prettier is installed from VSCode.
This resolved my issue on debian with code-server 1.408-vsc1.32.0.
sr229 commentedon Sep 12, 2019
Fixed by GH-857