windows7 install node14 version and above

Foreword:

A project was uploaded by gitee, and npm install kept reporting errors. It has not been solved, so I went to gitee to watch the front-end startup tutorial. The author said to run on node14 or 16. I went to the official website to download the msi of node14. This is not supported by windows7. I am on Baidu, they said to download the compressed package .

I have taken a lot of detours before, so I won’t repeat them, I will focus on the key points.

Index of /dist/

This link can choose to download the specified version of node. The version used by the author is 14.15.3 . Then click on it, and the suffix to download is .7z (I’m not sure if it’s related to the suffix, I’ve downloaded other versions, but I chose the suffix .zip, and the prompt can’t Locating the program input point GetHostNameW on the dynamic link library WS2_32.dll. (All tears...) ).

node-v14.15.3-win-x64.7z

Then put this file on the C drive (I just renamed the compressed file to nodejs64, so that it is convenient to refer to other people's article configuration). Just follow the step-by-step instructions taught online.

The referenced notes are:

win7 supports node14 and above versions - Nuggets recently migrated the project to the old computer win7 (win10 can't bring it) for development, and found that the latest version of nodejs no longer supports installation on win7. The last version is 13.18 or I have forgotten it. It's more painful, he doesn't support o https://juejin.cn/post/6962022161649254407#comment

 The link to the node version in him is the one I provided above.

Then configure the environment variables. How to configure it, I also refer to him, and then refer to the link he provided, which is more comprehensive. Just translate it yourself.

After the configuration is complete and the computer is restarted, run cmd to check the node version number. It has been newly installed by me, but the npm version number is still the higher version installed before, which is different from the author's. For the correspondence between the npm version and the node version, you can refer to this link ( previous version | Node.js ), I checked, and the author's node version is consistent with the npm version.

npm install [email protected] (install the specified version of npm), but it didn't work, why? Because the previous version already has a cache . Then delete the Nodejs under the D drive file . Just reinstall it again.

 

Finally, I installed dependencies with npm install, and my project reported no errors. Then npm run dev started the project, and no error was reported.

woo woo woo. After working on it for half an hour after get off work yesterday afternoon, until today, I finally solved it.

Guess you like

Origin blog.csdn.net/m0_65274248/article/details/125524826