Command 'Format Document With...' resulted in an error (command 'npm.packageManager' not found)
See original GitHub issueSummary
It does works first them when i reinstall the extension. But when i reload the VS CODE it stops working again.
Github Repository to Reproduce Issue
Just use any Javascript File
Steps To Reproduce:
- CMD + SHIFT + P
- Format Document With
- Prettier Code Formatter
Expected result
It should format the code
Actual result
It’s giving error Command 'Format Document With...' resulted in an error (command 'npm.packageManager' not found)
Additional information
Feel free to attach a screenshot.
VS Code Version: 1.55.2
Prettier Extension Version: 6.3.2
OS and version: OSX Catalina 10.15.6 (19G73
Prettier Log Output
["INFO" - 9:06:10 PM] Extension Name: esbenp.prettier-vscode.
["INFO" - 9:06:10 PM] Extension Version: 6.3.2.
["INFO" - 9:06:12 PM] Formatting /Volumes/D/www/php/wordpress/wp-content/plugins/analyzify/assets/analyzify-frontend.js
["INFO" - 9:06:12 PM] Using ignore file (if present) at /Volumes/D/www/php/wordpress/.prettierignore
["INFO" - 9:09:33 PM] Formatting /Volumes/D/www/php/wordpress/wp-content/plugins/analyzify/assets/analyzify-frontend.js
["INFO" - 9:09:33 PM] Using ignore file (if present) at /Volumes/D/www/php/wordpress/.prettierignore
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Prettier says it's formatting but it is not - Stack Overflow
If I run Format Document With > Prettier from the Command Palette, ... resulted in an error (command 'npm.packageManager' not found).
Read more >Command 'Format Document With...' resulted in an error ...
Command 'Format Document With...' resulted in an error (command 'npm.packageManager' not found)
Read more >ESLint - npm
You can install and configure ESLint using this command: ... both using Prettier to format your code and ESLint to catch possible errors....
Read more >npm, pnpm, and Yarn | IntelliJ IDEA Documentation - JetBrains
In the embedded Terminal ( Alt+F12 ) , type one of the following commands: npm install. yarn install. pnpm install. As a result...
Read more >npm packages in the Package Registry - GitLab Docs
When an npm package is not found in the Package Registry, the request is ... The GitLab npm repository supports the following commands...
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
@ntotten I think i found the issue 👍 when i have this config is set to true
"prettier.resolveGlobalModules": true
then it gives the above mentioned error.So please enable that setting and then test it also i am attaching the vscode settings.json file settings.json
This resolved it for me, thanks.