-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[BUG] Cannot convert undefined or null to object on unpublished package #4313
Comments
Same here for |
Same here.
|
Is there a plan to fix this at any point in the near future or should we be using |
I'm seeing the same error, In my case, Here's the debug stack trace, in case it's useful.
What's interesting is that the error is coming from Line 57 in ca756fd
EDIT: I found that it was happening because the project where I ran The bug is that somewhere |
are there any plans to fix this issue? the issue isn't with the |
The interesting thing that it is happening to me in docker-container only!! If i run |
This bug is very annoying. Any plans to fix it? |
This bug is preventing us to use |
For me it seems like this is a When inspecting This helps print the correct error: - versions: Object.keys(packument.versions),
+ versions: Object.keys(packument.versions || {}), This worked for me to upgrade the package-lock.json from v1 to v2, replace git checkout package-lock.json # restore your original package-lock
nvm use 16
npm install https://github.com/fortinet/ftnt-devops-ci/releases/download/1.1.7/ftnt-devops-ci-1.1.7.tgz
nvm use 14
npm install https://github.com/fortinet/ftnt-devops-ci/releases/download/1.1.7/ftnt-devops-ci-1.1.7.tgz
nvm use 16
npm install |
We had the problem with a slightly different use case. For us we didn't had the issue with an unpublished package, but rather with using {
"name": "npm-bug",
"dependencies": {
"trim": "0.0.2",
"my-trim": "npm:[email protected]"
}
} It has the same symptoms that it fails at the exact same position (and also won't fail when running I would say this issue is related to this PR #6363 and this issue as well #5110 |
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
When doing
npm install
and there is a package installed from github that has the same name as an unpublished package in npm, the error "Cannot convert undefined or null to object" appears. See npm/metavuln-calculator#7 (comment) and npm/metavuln-calculator#12The security audit causes a crash in npm. We cannot easily rename internally managed packages simply to avoid colliding with an unpublished npm package.
Expected Behavior
I expected the install to succeed (as it did in npm version 6).
Steps To Reproduce
Environment
The text was updated successfully, but these errors were encountered: