[BUG] Crash on conflict
Open
Nobody has claimed this yet.
Bug
Priority 1
Release 8.x
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
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
npm ERR! Cannot read properties of null (reading 'edgesOut')
npm ERR! A complete log of this run can be found in:
npm ERR! .npm/_logs/2022-07-12T14_15_56_150Z-debug-0.log
87 verbose stack TypeError: Cannot read properties of null (reading 'edgesOut')
87 verbose stack at [loadPeerSet] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1359:38)
87 verbose stack at async [buildDepStep] (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:976:11)
87 verbose stack at async Arborist.buildIdealTree (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js:218:7)
87 verbose stack at async Promise.all (index 1)
87 verbose stack at async Arborist.reify (/usr/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:153:5)
87 verbose stack at async Install.exec (/usr/lib/node_modules/npm/lib/commands/install.js:145:5)
87 verbose stack at async module.exports (/usr/lib/node_modules/npm/lib/cli.js:78:5)
88 verbose cwd /tmp/crash
89 verbose Linux 5.15.0-40-generic
90 verbose node v18.4.0
91 verbose npm v8.13.2
92 error Cannot read properties of null (reading 'edgesOut')
Expected Behavior
Expected to see errors about conflicting versions.
Steps To Reproduce
Steps to reproduce:
mkdir crash
cd crash
npm install @nestjs/platform-express@8
npm install @nestjs/core
Environment
- npm: 8.13.2
- Node.js: v18.4.0
- OS Name: Ubuntu 22.04 LTS
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the listed npm install reproduction with npm 8.13.2, then inspect [loadPeerSet] and [buildDepStep] in node_modules/@npmcli/arborist/lib/arborist/build-ideal-tree.js. Trace how the conflict reaches Arborist.reify in reify.js. Done means the reproduction reports conflicting versions instead of crashing on a null edgesOut value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100