Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install fails: ModuleNotFoundError: No module named 'distutils' #195

Open
sebastienbarbier opened this issue Jul 30, 2024 · 0 comments

Comments

@sebastienbarbier
Copy link
Owner

When running npm i on a fresh install, npm return an error when install node-sass.

node-sass is deprecated and should be replaced by sass.

The following issue occurs>

npm ERR! ModuleNotFoundError: No module named 'distutils'
npm ERR! gyp ERR! configure error 
npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onCpExit (/Users/sbarbier/dev/git/seven23/node_modules/node-gyp/lib/configure.js:259:16)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:518:28)

To temporarily avoid that issue, a solution consist in creating a python virtual env in the project and install setuptools locally:

python3 -m venv apps
source apps/bin/activate
python3 -m pip install setuptools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant