question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot find module '../ast-utils' when formating

See original GitHub issue

Hi all,

I’m getting the following error after installing prettier-vscode and trying to format a file.

Cannot find module '../ast-utils'

I have no idea about what’s happening.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:68
  • Comments:68 (2 by maintainers)

github_iconTop GitHub Comments

36reactions
frederikhorscommented, Jun 24, 2019

Same problem here with eslint 6.

rm -rf node_modules and npm i did not help.

Error:

Cannot find module '../util/ast-utils'

26reactions
Rennziecommented, Feb 10, 2020

Incase this is still an issue, I found that changing

"prettier.eslintIntegration": true

to

"prettier-eslint.eslintIntegration": true

in Settings (JSON) for VS Code fixed all the issues with prettier and eslint. I’ve managed to upgrade to the latest version of prettier and eslint and things are working as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ModuleNotFoundError: No module named 'distutils.core'
I can't figure out what to do. I tried to install distutils: milano@milano-PC:~$ sudo apt-get install python3-distutils Reading package lists...
Read more >
ModuleNotFoundError: No module named 'distutils.cmd' #124
The reason I am trying to install pip via get-pip.py is to have Python3.9 only, with no 3.8. I seems, I will have...
Read more >
2. Writing the Setup Script — Python 3.11.1 documentation
The setup script is the centre of all activity in building, distributing, and installing modules using the Distutils. The main purpose of the...
Read more >
python - ModuleNotFoundError: No module named 'distutils.util'
The module not found likely means the packages aren't installed. sudo apt-get install python3-distutils sudo apt-get install python3-apt.
Read more >
no module named 'distutils.cmd' python 3.9 - You.com
After installing the “distutils” module, your Python script should be ... It appears you are missing some prerequisite to build the package from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found