Skip to content

[Bug]: npm install not working without distutils #1513

Closed
@devtobi

Description

Version

  • I'm using version 1.16

Known issues

  • I've checked Known issues

Existing issues

  • I've checked Existing issues

Advanced Preferences

  • I've checked Advanced Preferences

What operating system are you using?

macOS

Operating System Version

macOS 15.1.1

Reproduction steps

  1. I installed suggested node version 20.18.0
  2. Checked out the source code
  3. Run npm install inside the root directory

Reproduces how often: [What percentage of the time does it reproduce?]

Expected Behavior

npm install should run just fine.

Actual Behavior

npm installfails and I cannot setup the repository for development.

Relevant log output

File "/Users/devtobi/Development/repositories/github/stretchly/node_modules/node-gyp/gyp/gyp_main.py", line 42, in <module>
npm error     import gyp  # noqa: E402
npm error     ^^^^^^^^^^
npm error   File "/Users/devtobi/Development/repositories/github/stretchly/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 9, in <module>
npm error     import gyp.input
npm error   File "/Users/devtobi/Development/repositories/github/stretchly/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 19, in <module>
npm error     from distutils.version import StrictVersion
npm error ModuleNotFoundError: No module named 'distutils'

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions