prettier-eslint: Cannot find module './utils/ast-utils'
Versions:
prettier-eslint
version: 9.0.0node
version: 10.17.0npm
(oryarn
) version: yarn 1.19.1
Have you followed the debugging tips?
Yes
Relevant code or config
https://gist.github.com/selfagency/d09dddd361376e47d515a0f1483b03de
What I did:
I use prettier-eslint
via Vetur in VS Code and it’s been working just fine up until today, when it started throwing the following error.
What happened:
[INFO - 8:33:35 AM] Loaded module 'prettier-eslint@undefined' from '/Users/daniel/code/ironmarch/web/node_modules/prettier-eslint/dist/index.js'.
[ERROR - 8:33:35 AM] Error
Cannot find module './utils/ast-utils'
Require stack:
- /Users/daniel/code/ironmarch/web/node_modules/eslint/lib/rules/arrow-spacing.js
- /Users/daniel/code/ironmarch/web/node_modules/eslint/lib/built-in-rules-index.js
- /Users/daniel/code/ironmarch/web/node_modules/eslint/lib/rules.js
- /Users/daniel/code/ironmarch/web/node_modules/eslint/lib/linter.js
- /Users/daniel/code/ironmarch/web/node_modules/eslint/lib/api.js
- /Users/daniel/code/ironmarch/web/node_modules/prettier-eslint/dist/utils.js
- /Users/daniel/code/ironmarch/web/node_modules/prettier-eslint/dist/index.js
- /Users/daniel/.vscode/extensions/esbenp.prettier-vscode-3.6.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
Problem description:
Cannot find module ‘./utils/ast-utils’
Suggested solution:
¯\_(ツ)_/¯
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 7
- Comments: 16 (3 by maintainers)
I got the same issue, but i think mostly because the newest version of eslint.
This didn’t fix my issue 😦 https://www.stephencharlesweiss.com/2019-10-14/eslint-prettier-vscode/
However, the following steps did seem to rectify the issue:
rm -rf ./node_modules && yarn
"prettier-eslint.eslintIntegration": true,
to VSCode Settings file (ignore Unknown configuration setting warning)"prettier-eslint.eslintIntegration": true,
that was just put in¯\_(ツ)_/¯
@victoriatomzik just started getting this error too. Maybe this is something new? Like, package become broken
I believe @victoriatomzik’s issue was related to typescript-eslint not supporting ESLint 5. https://github.com/typescript-eslint/typescript-eslint/pull/2917 was recently merged which fixes this.
This PR is available on NPM at/above 4.12.1-alpha.1