idahogurl / vs-code-prettier-eslint

A Visual Studio Code Extension to format JavaScript and TypeScript code using the prettier-eslint package.
MIT License
190 stars 47 forks source link

Error: Cannot find module 'eslint' which is already installed #197

Closed nikkehtine closed 8 months ago

nikkehtine commented 10 months ago

Describe the bug Going into the Output > Prettier ESLint tab, I get Error: Cannot find module 'eslint' every time I save the file. Prettier, ESLint and prettier-eslint are all installed globally on my machine, and the problem persists even when I install them as a dev dependency in my project.

Versions:

System Specifications:

I couldn't find any information on what could cause this issue and how to fix it. If it's out there then I'm terribly sorry.

mattbrannon commented 10 months ago

Prettier 3.0 switched entirely to ESModules. Try downgrading prettier to version 2.8.8

pnpm remove prettier && pnpm add prettier@2.8.8
wysok commented 9 months ago

The same here.

Versions:

VS Code Prettier ESLint extension 5.1.0 VSCodium: 1.85.0 (Universal) Node: 18.18.2 npm: 9.8.1 prettier: 2.8.8 eslint: 8.15.0 typescript: 5.3.2

System: macOS 13.6.1 (22G313) Chip Apple M2

Require stack:
- /Users/[MY_USER]/.vscode/extensions/rvest.vs-code-prettier-eslint-5.1.0/dist/extension.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/loader.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-amd.js
- /Applications/Visual Studio Code.app/Contents/Resources/app/out/bootstrap-fork.js
zhangzhuang15 commented 9 months ago

Look at this, it might help you @wysok

github-actions[bot] commented 8 months ago

This issue is stale because it has been open for 14 days with no activity.

github-actions[bot] commented 8 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.