Repository navigation
ng new fails to install packages #34083
Copy link
Copy link
Closed as not planned
Labels
area: @schematics/angulargemini-triagedLabel noting that an issue has been triaged by geminiLabel noting that an issue has been triaged by gemini
Milestone
Description
Which @angular/* package(s) are the source of the bug?
compiler-cli
Is this a regression?
Yes
Description
The simplest bug to reproduce. Get the latest Angular version (22.1.8), run:
ng new myapp
select all default options, the error in the end is:
npm error Cannot read properties of null (reading 'edgesOut')
...
✖ Package install failed, see above.
The Schematic workflow failed. See above.
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
✔ Which stylesheet system would you like to use? CSS [ https://developer.mozilla.org/docs/Web/CSS ]
✔ Do you want to enable Server-Side Rendering (SSR) and Static Site Generation (SSG/Prerendering)? No
✔ Which AI tools should Angular integrate with? https://angular.dev/ai/develop-with-ai None
CREATE ng22/.prettierrc (173 bytes)
CREATE ng22/angular.json (1970 bytes)
CREATE ng22/package.json (779 bytes)
CREATE ng22/README.md (1516 bytes)
CREATE ng22/tsconfig.json (939 bytes)
CREATE ng22/.editorconfig (331 bytes)
CREATE ng22/.gitignore (666 bytes)
CREATE ng22/tsconfig.app.json (412 bytes)
CREATE ng22/tsconfig.spec.json (423 bytes)
CREATE ng22/.vscode/extensions.json (134 bytes)
CREATE ng22/.vscode/launch.json (490 bytes)
CREATE ng22/.vscode/tasks.json (1020 bytes)
CREATE ng22/src/main.ts (228 bytes)
CREATE ng22/src/index.html (303 bytes)
CREATE ng22/src/styles.css (81 bytes)
CREATE ng22/src/app/app.spec.ts (702 bytes)
CREATE ng22/src/app/app.ts (299 bytes)
CREATE ng22/src/app/app.css (0 bytes)
CREATE ng22/src/app/app.html (20488 bytes)
CREATE ng22/src/app/app.config.ts (322 bytes)
CREATE ng22/src/app/app.routes.ts (80 bytes)
CREATE ng22/public/favicon.ico (15086 bytes)
npm error Cannot read properties of null (reading 'edgesOut')
npm error A complete log of this run can be found in: C:\Dev\_User\.npm-cache\_logs\2026-09-10T17_56_59_439Z-debug-0.log
✖ Package install failed, see above.
The Schematic workflow failed. See above.
Please provide the environment you discovered this bug in (run ng version)
Angular CLI : 22.1.8
Node.js : 22.23.2
Package Manager : npm 10.9.8
Operating System : win32 x64
Anything else?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: @schematics/angulargemini-triagedLabel noting that an issue has been triaged by geminiLabel noting that an issue has been triaged by gemini
Activity
alan-agius4 commentedon Sep 11, 2026
This is an NPM bug, either update to the latest patch version of NPM or use an alternate package manager.
Platonn commentedon Sep 11, 2026
We also started facing this error in last days in our team. We didn't change the Angular CLI version, nor the npm version.
So I'm wondering what changed that this error started to happen in
ng newcommands(Side note: we're building an Angular 3rd party library installable with our custom schematics - that's why we run
ng newin our tests often 😉 )I've also noticed that a workaround to avoid
edgesOuterror is to use--test-runner=karma(instead of the default vitest)!So I only guess the problem is caused by some recently-rearranged tree of transitive dependencies behind Angular and/or Vitest that cause conflicting peerDpes constraints, that npm 10 cannot handle and it crushes?
I confirm, switching to Node24+npm11 fixes the problem (i.e. no need for
--test-runner=karmaworkaround)vladt22 commentedon Sep 11, 2026
Here https://angular.dev/reference/versions Angular is listed as compatible with Node ^22.22.3 which according to this: https://nodejs.org/en/about/previous-releases ships with npm version v10.9.8.
Should not Angular v22 bump minimum required node version? Otherwise it is misleading IMHO.
alan-agius4 commentedon Sep 11, 2026
The Node.js compatibility information defines support for the Node.js runtime itself, not the bundled npm version.
Node.js is fully compatible, and this failure is caused by a bug in npm. Package managers including NPM can be updated independently of Node.js, and developers can also use other package managers such as yarn or pnpm. Bumping the minimum required Node.js version would unnecessarily restrict developers whose setups work without issues.
angular-automatic-lock-bot commentedon Oct 22, 2026
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.