Hi,
feeling a little ackward to post this. i have been working with node-red since at least 2 years and have installed many instances on few PC but never faced this issue, so i am stuck. searched forum and net for this issue but nowhere i could find exact issue. there are some issues similar reported for few nodes but not for node-red itself.
I am getting following error on a freshly formatted windows pc.
OS -Windows 11 Pro
PS C:\Users\oee.ldh> npm install -g --unsafe-perm node-red
npm error code SELF_SIGNED_CERT_IN_CHAIN
npm error errno SELF_SIGNED_CERT_IN_CHAIN
npm error request to https://registry.npmjs.org/node-red failed, reason: self-signed certificate in certificate chain
npm error A complete log of this run can be found in: C:\Users\oee.ldh\AppData\Local\npm-cache\_logs\2024-12-05T07_27_36_708Z-debug-0.log
the error log.
0 verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
1 info using npm@10.8.2
2 info using node@v20.18.1
3 silly config load:file:C:\Program Files\nodejs\node_modules\npm\npmrc
4 silly config load:file:C:\Users\oee.ldh\NR-ADMIN\.npmrc
5 silly config load:file:C:\Users\oee.ldh\.npmrc
6 silly config load:file:C:\Users\oee.ldh\AppData\Roaming\npm\etc\npmrc
7 verbose title npm install node-red
8 verbose argv "install" "node-red"
9 verbose logfile logs-max:10 dir:C:\Users\oee.ldh\AppData\Local\npm-cache\_logs\2024-12-05T07_38_02_267Z-
10 verbose logfile C:\Users\oee.ldh\AppData\Local\npm-cache\_logs\2024-12-05T07_38_02_267Z-debug-0.log
11 silly packumentCache heap:2197815296 maxSize:549453824 maxEntrySize:274726912
12 silly logfile start cleaning logs, removing 1 files
13 silly logfile done cleaning log files
14 silly idealTree buildDeps
15 silly fetch manifest node-red@*
16 silly packumentCache full:http://registry.npmjs.org/node-red cache-miss
17 http fetch GET https://registry.npmjs.org/node-red attempt 1 failed with SELF_SIGNED_CERT_IN_CHAIN
18 http fetch GET https://registry.npmjs.org/node-red attempt 2 failed with SELF_SIGNED_CERT_IN_CHAIN
19 http fetch GET https://registry.npmjs.org/node-red attempt 3 failed with SELF_SIGNED_CERT_IN_CHAIN
20 silly placeDep ROOT node-red@ OK for: want: *
21 verbose type system
22 verbose stack FetchError: request to https://registry.npmjs.org/node-red failed, reason: self-signed certificate in certificate chain
22 verbose stack at ClientRequest.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14)
22 verbose stack at ClientRequest.emit (node:events:518:28)
22 verbose stack at emitErrorEvent (node:_http_client:101:11)
22 verbose stack at _destroy (node:_http_client:884:9)
22 verbose stack at onSocketNT (node:_http_client:904:5)
22 verbose stack at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
23 error code SELF_SIGNED_CERT_IN_CHAIN
24 error errno SELF_SIGNED_CERT_IN_CHAIN
25 error request to https://registry.npmjs.org/node-red failed, reason: self-signed certificate in certificate chain
26 silly unfinished npm timer reify 1733384282827
27 silly unfinished npm timer reify:loadTrees 1733384282832
28 verbose cwd C:\Users\oee.ldh\NR-ADMIN
29 verbose os Windows_NT 10.0.22631
30 verbose node v20.18.1
31 verbose npm v10.8.2
32 verbose exit 1
33 verbose code 1
34 error A complete log of this run can be found in: C:\Users\oee.ldh\AppData\Local\npm-cache\_logs\2024-12-05T07_38_02_267Z-debug-0.log
I think (not totally sure) that you only need something in there if you need npm to go via a secured non-transparent proxy (typical in some enterprise environments).
My worry with work arounds like that is someone managing to insert a rogue proxy. Without proper https, you are then very vulnerable. The risk is relatively low though for a short while.
But it doesn't fix the issue of course which really does need fixing.