-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Open
Labels
Bugthing that needs fixingthing that needs fixingPriority 2secondary priority issuesecondary priority issueRelease 8.xwork is associated with a specific npm 8 releasework is associated with a specific npm 8 release
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
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#12
The 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
- Create a package.json that references a github repository with the same name as an unpublished package. e.g.
"dependencies": {
"mwater-forms": "github:mWater/mwater-forms"
},
- With latest npm
- Run npm install
- See error: "Cannot convert undefined or null to object"
Environment
- npm: 8.3.2
- Node.js: v16.13.2
- OS Name: Mint 20.3
- System Model Name: Dell?
- npm config:
; "user" config from /home/clayton/.npmrc
//registry.npmjs.org/:_authToken = (protected)
; node bin location = /home/clayton/.nvm/versions/node/v16.13.2/bin/node
; cwd = /home/clayton/dev/scratch/failnpm
; HOME = /home/clayton
; Run `npm config ls -l` to show all defaults.bre1470, pawelfus, nnmn, sgarg7, monkbroc and 16 moreryaa and JockVanDallas
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingPriority 2secondary priority issuesecondary priority issueRelease 8.xwork is associated with a specific npm 8 releasework is associated with a specific npm 8 release