Vetur format vue with prettier-eslint failed: "Prettier-Eslint format failed: Cannot find module 'prettier'"
See original GitHub issue- I have searched through existing issues
- I have read through docs
- I have read FAQ
- I have tried restarting VS Code or running
Vetur: Restart VLS
Info
- Platform: Win
- Vetur version: v0.30.2
- VS Code version: 1.51.1
Problem
format with “prettier-eslint” failed_(:з」∠)_ Vue Language Server output is:
[INFO ] Loaded bundled typescript@4.0.5.
[INFO ] Loaded bundled prettier.
[INFO ] Loaded bundled @starptech/prettyhtml.
[INFO ] Loaded bundled prettier-eslint.
[INFO ] Loaded bundled prettier-tslint.
[INFO ] Loaded bundled stylus-supremacy.
[INFO ] Loaded bundled @prettier/plugin-pug.
Vetur initialized
Prettier-Eslint format failed
[Error - time] Cannot find module 'prettier'
Require stack:
- c:\Users\Administrator\.vscode\extensions\octref.vetur-0.30.2\server\dist\vls.js
- c:\Users\Administrator\.vscode\extensions\octref.vetur-0.30.2\server\dist\vueServerMain.js
Reproducible Case
just install vetur and set config "vetur.format.defaultFormatter.js": "prettier-eslint",
and create a simple vue project by vue/cli and then open a vue file and then alt + shift + f
then Vue Language Server output appear message show above.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Vue/TypeScript/ESLint/Prettier/Vetur formatting doesn't work
To get Vue/TypeScript/ESLint/Prettier/Vetur working in VSCode, I followed the following steps: Installed the Vue eslint plugin by running ...
Read more >How I Resolved Vue.js, VSCode, Vetur, Prettyhtml, and ...
So, when open a .vue file in VS Code and Format Document with Vetur, it uses Prettyhtml by default, which violates prettier ES...
Read more >Using Prettier and ESLint to automate formatting and fixing ...
Learn how to use ESLint and Prettier together to automatically format and fix JavaScript code in your projects.
Read more >Vim Setup - Prettier
Vim users can install either vim-prettier, which is Prettier specific, or Neoformat or ALE which are generalized lint/format engines with support for ...
Read more >[eslint] failed to load config "@vue/prettier" to extend from.
PS C:\Users\Vena\Desktop\meal-prep> npm i @vue/eslint-config-prettier npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Released v0.30.3
If you use
vetur.useWorkspaceDependencies: true
? Please open a new issue.