docs: tell quickstart readers how to get past the npm edgesOut crash - #3787
Conversation
`npm create @angular@21` fails with "Cannot read properties of null (reading 'edgesOut')" on npm older than 11.6, which is what the newest Node.js 20 and 22 releases come with. It is an npm bug (npm/cli#9787), but a reader hits it at step 1. The line says to delete the project folder because the failed run leaves one behind, and running the command again into it fails with a merge conflict on package.json. Fixes angular#3785
tyler-reitz
left a comment
There was a problem hiding this comment.
Approving.
One to watch: npm/cli#9787 is still open and labeled "Cannot Reproduce", so the 11.6 boundary rests on your bisect rather than on a landed fix. It could move again in a later npm.
Not blocking, but worth considering: Node 20.20.2 ships npm 10.8.2 and Node 22.23.3 ships npm 10.9.9, both in your failing set. So every reader on a current Node 20 or 22 hits this at step 1, not an unlucky subset. That may justify making npm install -g npm@11 an unconditional instruction in step 1 rather than a recovery line people only read after it breaks.
Every Node.js 20 and 22 release bundles npm 10, so the recovery note under step 1 reached those readers only after the command had failed once. Asking for npm 11.6 up front avoids the failure. The fix is npm/cli#8448, shipped in arborist 9.1.4 with npm 11.6.0, and npm 10 stays on arborist 8.
|
On the boundary, it turns out to be a landed fix: npm/cli#8448 closed npm/cli#8261, the same I took your suggestion about making it unconditional. I moved it to "Before you begin" as a requirement for npm 11.6 or later, in the follow-up commit. |
Fixes #3785
Adds one line under step 1 of
docs/install-and-setup.mdfor readers whosenpm create @angular@21stops withnpm error Cannot read properties of null (reading 'edgesOut').Verification
On 2026-10-02, with Node.js 22.23.2:
npm create @angular@21 <project-name>on npm 10.9.8 fails with that error and leaves the project folder behind.A merge conflicted on path "/<project-name>/package.json"., which is why the line says to delete the folder first.npm@11and notnpm@latestbecause npm 12 requires Node.js 22.22.2 or later, and Angular 21 also supports Node.js 20.