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

Globally installed NPM version 8 causes "Cannot find module 'npm'" #7

Closed
RappC opened this issue Oct 21, 2021 · 1 comment
Closed

Comments

@RappC
Copy link

RappC commented Oct 21, 2021

This is due to a missing index.js file within npm being referenced in its package,json main property.

Tested with npm installed via linux homebrew.

When running the tests included in this project with npm 8 the tests fail with
Error: The programmatic API was removed in npm v8.0.0

@dracupid
Copy link
Owner

This issue is casued by a breaking change of npm@8, npm/cli#3762.
I have tried to make global-npm work under npm@8, but it seems that programmatic api via require('npm') may be no longer supported.

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

2 participants