npm / npm/cli

NPM not working Windows

Open
#3,326 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Release 7.x
Dominant language
JavaScript
Stars
10.1k
Forks
4.7k
Avg merge
2d 2h
Merged PRs (30d)
19

Description

Hi,

NPM is not working our new computer which has Windows 10. When I called "npm install express" throw "Children of null" exception. Other windows computer I didn't face issue like that. How can I fix the problem. Thanks in advance

0 verbose cli [
0 verbose cli 'C:\Program Files\nodejs\node.exe',
0 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
0 verbose cli 'install',
0 verbose cli 'express'
0 verbose cli ]
1 info using npm@7.13.0
2 info using node@v16.2.0
3 timing npm:load:whichnode Completed in 2ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 2ms
6 timing config:load:builtin Completed in 2ms
7 timing config:load:cli Completed in 1ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:C:\Users\İbrahim Koray Billur\Desktop\test.npmrc Completed in 0ms
10 timing config:load:project Completed in 1ms
11 timing config:load:file:C:\Users\İbrahim Koray Billur.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:C:\Users\İbrahim Koray Billur\AppData\Roaming\npm\etc\npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 1ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 10ms
19 timing npm:load:configload Completed in 10ms
20 timing npm:load:setTitle Completed in 0ms
21 timing npm:load:setupLog Completed in 2ms
22 timing npm:load:cleanupLog Completed in 2ms
23 timing npm:load:configScope Completed in 0ms
24 timing npm:load:projectScope Completed in 1ms
25 timing npm:load Completed in 17ms
26 timing config:load:flatten Completed in 3ms
27 timing arborist:ctor Completed in 1ms
28 timing arborist:ctor Completed in 0ms
29 timing idealTree:init Completed in 18ms
30 timing idealTree:userRequests Completed in 2ms
31 silly idealTree buildDeps
32 silly fetch manifest express@*
33 http fetch GET 304 https://registry.npmjs.org/express 281ms (from cache)
34 silly placeDep ROOT express@4.17.1 OK for: test@1.0.0 want: *
35 timing idealTree Completed in 340ms
36 timing command:install Completed in 354ms
37 verbose stack TypeError: Cannot read property 'children' of null
37 verbose stack at Arborist.[placeDep] (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\build-ideal-tree.js:1448:32)
37 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\build-ideal-tree.js:906:46
37 verbose stack at Array.map ()
37 verbose stack at Arborist.[buildDepStep] (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\build-ideal-tree.js:906:8)
37 verbose stack at async Arborist.buildIdealTree (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\build-ideal-tree.js:218:7)
37 verbose stack at async Promise.all (index 1)
37 verbose stack at async Arborist.reify (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\arborist\lib\arborist\reify.js:135:5)
37 verbose stack at async Install.install (C:\Program Files\nodejs\node_modules\npm\lib\install.js:137:5)
38 verbose cwd C:\Users\İbrahim Koray Billur\Desktop\test
39 verbose Windows_NT 10.0.19042
40 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "express"
41 verbose node v16.2.0
42 verbose npm v7.13.0
43 error Cannot read property 'children' of null
44 verbose exit 1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported npm install express command and the stack trace in @npmcli/arborist/lib/arborist/build-ideal-tree.js, especially the [placeDep] entry. Reproduce it on Windows 10 with Node v16.2.0 and npm 7.13.0, then determine the change needed so the install completes without the children of null error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.