Windows 10 with early build npm fails to install any modules due to 'bad signature'

Viewed 158

I'm am installing 64-bit Node v7.10.1 (which uses npm v4.2.0) on my brand new Windows laptop (Windows 10 Pro, Version 20H2, Build 19042.1645). My application needs this early version of Node unfortunately. So far I have installed Node using three different processes: nvm for Windows, NVS and direct download. I've scanned the Net looking for solutions and found many similar issues but very few possible solutions. My question is a duplicate of npm install fails with bad signature error on Windows, but the suggestions there don't help me. I feel the need to re-raise this issue.

After installing Node and creating a new directory to work in, I issue the command npm install path The response I get is this:

npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "path"
npm ERR! node v7.10.1
npm ERR! npm  v4.2.0
npm ERR! code EPROTO
npm ERR! errno EPROTO
npm ERR! syscall write

npm ERR! write EPROTO 101057795:error:1408D07B:SSL routines:ssl3_get_key_exchange:bad signature:openssl\ssl\s3_clnt.c:2032:
npm ERR!
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\pdqsw\AppData\Roaming\npm-cache\_logs\2022-04-13T13_45_23_254Z-debug.log

I've tried using a different registry and used http instead of https for it. I've tried setting strict-ssl to false.

If I install Node 8.0.0, which uses npm v5.0.0, then path installs perfectly.

What is very frustrating is that I did a similar setup two or three years ago on another W10 laptop and that has been working with Node 7.10.1 (installing many modules) for all that time. Thanks in anticipation of receiving some clues to resolving this.

Edited 19/04/2022:

In trying to find a way around the above problem I have installed WSL for Windows 10 with Ubuntu Linux. This allowed me to install Node 7.10.1 no problem, and with npm now installing modules happily. My system is now running (or seems to be) perfectly and I can still easily edit my program files using VSC in the Windows environment. So I think I shall stay with this configuration, at least for now.

0 Answers
Related