nuejs / create-nue

A recommended way to start a Nue project
https://nuejs.org
139 stars 30 forks source link

`npm install` error: cannot read 'insert' of undefined #2

Closed nerbl closed 1 year ago

nerbl commented 1 year ago

This is on Ubuntu WSL and I just installed npm via apt --no-install-recommends

The error itself is

npm ERR! Cannot read property 'insert' of undefined
Log
0 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install' ]
1 info using npm@8.5.1
2 info using node@v12.22.9
3 timing npm:load:whichnode Completed in 0ms
4 timing config:load:defaults Completed in 2ms
5 timing config:load:file:/usr/share/nodejs/npm/npmrc Completed in 2ms
6 timing config:load:builtin Completed in 2ms
7 timing config:load:cli Completed in 2ms
8 timing config:load:env Completed in 0ms
9 timing config:load:file:/home/mario/nue/create-nue/.npmrc Completed in 1ms
10 timing config:load:project Completed in 2ms
11 timing config:load:file:/home/mario/.npmrc Completed in 0ms
12 timing config:load:user Completed in 0ms
13 timing config:load:file:/etc/npmrc Completed in 0ms
14 timing config:load:global Completed in 0ms
15 timing config:load:validate Completed in 2ms
16 timing config:load:credentials Completed in 1ms
17 timing config:load:setEnvs Completed in 0ms
18 timing config:load Completed in 13ms
19 timing npm:load:configload Completed in 13ms
20 timing npm:load:setTitle Completed in 0ms
21 timing config:load:flatten Completed in 2ms
22 timing npm:load:display Completed in 3ms
23 verbose logfile /home/mario/.npm/_logs/2023-09-15T08_36_10_404Z-debug-0.log
24 timing npm:load:logFile Completed in 4ms
25 timing npm:load:timers Completed in 0ms
26 timing npm:load:configScope Completed in 0ms
27 timing npm:load Completed in 20ms
28 timing arborist:ctor Completed in 1ms
29 timing arborist:ctor Completed in 0ms
30 timing idealTree:init Completed in 12ms
31 timing idealTree:userRequests Completed in 1ms
32 silly idealTree buildDeps
33 silly fetch manifest nuejs-core@^0.1.0
34 silly fetch manifest js-yaml@^4.1.0
35 silly placeDep ROOT js-yaml@ OK for: create-nue@0.1.3 want: ^4.1.0
36 silly placeDep ROOT nuejs-core@ OK for: create-nue@0.1.3 want: ^0.1.0
37 timing idealTree:#root Completed in 131ms
38 timing idealTree:node_modules/js-yaml Completed in 0ms
39 timing idealTree:node_modules/nuejs-core Completed in 0ms
40 timing idealTree:buildDeps Completed in 131ms
41 timing idealTree:fixDepFlags Completed in 0ms
42 timing idealTree Completed in 145ms
43 timing command:install Completed in 160ms
44 verbose stack TypeError: Cannot read property 'insert' of undefined
44 verbose stack     at CacheEntry.store (/usr/share/nodejs/npm/node_modules/make-fetch-happen/lib/cache/entry.js:325:27)
44 verbose stack     at cacheFetch (/usr/share/nodejs/npm/node_modules/make-fetch-happen/lib/cache/index.js:18:18)
44 verbose stack     at processTicksAndRejections (internal/process/task_queues.js:97:5)
44 verbose stack     at async fetch (/usr/share/nodejs/npm/node_modules/make-fetch-happen/lib/fetch.js:98:7)
44 verbose stack     at async Arborist.[nodeFromEdge] (/usr/share/nodejs/@npmcli/arborist/lib/arborist/build-ideal-tree.js:1082:19)
44 verbose stack     at async Arborist.[buildDepStep] (/usr/share/nodejs/@npmcli/arborist/lib/arborist/build-ideal-tree.js:951:11)
44 verbose stack     at async Arborist.buildIdealTree (/usr/share/nodejs/@npmcli/arborist/lib/arborist/build-ideal-tree.js:215:7)
44 verbose stack     at async Promise.all (index 1)
44 verbose stack     at async Arborist.reify (/usr/share/nodejs/@npmcli/arborist/lib/arborist/reify.js:152:5)
44 verbose stack     at async Install.exec (/usr/share/nodejs/npm/lib/commands/install.js:157:5)
45 verbose cwd /home/mario/nue/create-nue
46 verbose Linux 5.15.90.1-microsoft-standard-WSL2
47 verbose argv "/usr/bin/node" "/usr/bin/npm" "install"
48 verbose node v12.22.9
49 verbose npm  v8.5.1
50 error Cannot read property 'insert' of undefined
51 verbose exit 1
52 timing npm Completed in 337ms
53 verbose unfinished npm timer reify 1694766970576
54 verbose unfinished npm timer reify:loadTrees 1694766970588
55 verbose code 1
56 error A complete log of this run can be found in:
56 error     /home/mario/.npm/_logs/2023-09-15T08_36_10_404Z-debug-0.log
nerbl commented 1 year ago

I installed node.js on the Windows side and got much further but eventually encountered

self-signed certificate in certificate chain

After some searching, it's a proxy issue.