Skip to content

[BUG] Cannot read properties of null (reading 'edgesOut') - on npm i #8261

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

Open
2 tasks done
philSixZero opened this issue Apr 28, 2025 · 2 comments
Open
2 tasks done
Labels
Bug thing that needs fixing Priority 2 secondary priority issue

Comments

@philSixZero
Copy link

philSixZero commented Apr 28, 2025

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

After a simple npm i the CLI errors with:

npm error Cannot read properties of null (reading 'edgesOut')

The log shows the following:

289 silly fetch manifest happy-dom@*
290 silly packumentCache full:https://company-registry:8765/npm/hmrs-dev-internal-npm/happy-dom cache-miss
291 http cache https://company-registry:8765/npm/hmrs-dev-internal-npm/happy-dom 22ms (cache hit)
292 silly packumentCache full:https://company-registry:8765/npm/hmrs-dev-internal-npm/happy-dom set size:1135281 disposed:false
293 verbose stack TypeError: Cannot read properties of null (reading 'edgesOut')
293 verbose stack     at #loadPeerSet (C:\Users\username\AppData\Roaming\nvm\v22.14.0\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1304:38)
293 verbose stack     at async #buildDepStep (C:\Users\username\AppData\Roaming\nvm\v22.14.0\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:915:11)
293 verbose stack     at async Arborist.buildIdealTree (C:\Users\username\AppData\Roaming\nvm\v22.14.0\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:182:7)
293 verbose stack     at async Promise.all (index 1)
293 verbose stack     at async Arborist.reify (C:\Users\username\AppData\Roaming\nvm\v22.14.0\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:130:5)
293 verbose stack     at async Install.exec (C:\Users\username\AppData\Roaming\nvm\v22.14.0\node_modules\npm\lib\commands\install.js:149:5)
293 verbose stack     at async Npm.exec (C:\Users\username\AppData\Roaming\nvm\v22.14.0\node_modules\npm\lib\npm.js:208:9)
293 verbose stack     at async module.exports (C:\Users\username\AppData\Roaming\nvm\v22.14.0\node_modules\npm\lib\cli\entry.js:67:5)
294 error Cannot read properties of null (reading 'edgesOut')
295 silly unfinished npm timer reify 1745836838067
296 silly unfinished npm timer reify:loadTrees 1745836838069
297 silly unfinished npm timer idealTree:buildDeps 1745836838098
298 silly unfinished npm timer idealTree:#root 1745836838100
300 verbose os Windows_NT 10.0.26100
301 verbose node v22.14.0
302 verbose npm  v11.3.0
303 verbose exit 1
304 verbose code 1

Expected Behavior

No response

Steps To Reproduce

I'm trying to provide a reproduction package.json file.

Environment

  • npm: 11.3.0
  • Node.js: 22.14.0
  • OS Name: Windows 11
  • System Model Name:
  • npm config:
; copy and paste output from `npm config ls` here
@philSixZero philSixZero added Bug thing that needs fixing Needs Triage needs review for next steps labels Apr 28, 2025
@milaninfy milaninfy added Needs Triage needs review for next steps Cannot Reproduce and removed Needs Triage needs review for next steps labels Apr 28, 2025
@jurgensweere
Copy link

jurgensweere commented May 6, 2025

I was able to reproduce this issue by using this package.json

{
  "name": "peer",
  "version": "1.0.0",
  "description": "",
  "devDependencies": {
    "vitest": "^3.1.2",
    "@vitest/ui": "3.1.2"
  }
}

In this case, there is a pinned version of @vitest/ui which matches the version of the not pinned vitest

I believe I got into this scenario by using @nx/vite

edit: if you have the same issue like above, I fixed it by making sure all versions are aligned perfectly:

"devDependencies": {
    "vitest": "^3.1.2",
    "@vitest/ui": "^3.1.2"
  }

@milaninfy milaninfy added Priority 2 secondary priority issue and removed Cannot Reproduce Needs Triage needs review for next steps labels May 9, 2025
@milaninfy
Copy link
Contributor

able to replicate locally with json provided by @jurgensweere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Priority 2 secondary priority issue
Projects
None yet
Development

No branches or pull requests

3 participants