Cannot find module './utils/ast-utils'
See original GitHub issueVersions:
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:
¯\_(ツ)_/¯
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:16 (2 by maintainers)
Top Results From Across the Web
Issues - GitHub
Hi all, I'm getting the following error after installing prettier-vscode and trying to format a file. Cannot find module '../ast-utils' I ...
Read more >eslint error from vue Error: Cannot find module 'eslint/lib/ast-utils'
In my case I got a similar Error: Cannot find module 'eslint/lib/rules/utils/ast-utils' and I needed to upgrade eslint - v5 to v7 worked...
Read more >jsx-ast-utils - npm
Usage. This is a utility module to evaluate AST objects for JSX syntax. This can be super useful when writing linting rules for...
Read more >Cannot find module 'eslint/lib/ast-utils'-Vue.js - appsloveworld
In my case I got a similar Error: Cannot find module 'eslint/lib/rules/utils/ast-utils' and I needed to upgrade eslint - v5 to v7 worked...
Read more >JavaScript Utils Module Not Found - Codecademy Forums
npm install utils --save; npm cache clean -f; Deleting the node_modules folder, package.json, package-lock.json, and then running npm install.
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
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¯\_(ツ)_/¯