Node.js Installation Stepping Pit Notes

I recently started working on the H5 project, and here are some strange problems encountered when installing Node.js

Normally, installing Node.js is as simple as it gets:

Download the installation package first. According to my operating system, mine is 64-bit, so I downloaded x64, and 32-bit downloads x86.

node.js download address

insert image description here
Under normal circumstances, after downloading, double-click to run, then follow the prompts all the way to Next, and finally click Finish:

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
Under normal circumstances, the final Finish interface should appear here, but at this time, two prompts with error codes 2503 and 2502 pop up suddenly, to the effect that the software installation permission is insufficient:

insert image description here
The general solution at this time is to right-click the installation package, click "Run as administrator" to open the installation package, and perform the above operations again. But unfortunately, the right button of the file with the .msi suffix does not have the option of "run as administrator". But don't worry, we can achieve this effect in another way:

Create a new .cmd file, I named it nodeSetup.cmd here, and then paste the following code into it, pay attention to replace the installation package path after /i with your own. Then right click and "Run as Administrator".

msiexec /i F:\node\node-v10.24.1-x64.msi

insert image description here
At this time, we found that the installation package has been opened. At this time, we only need to go through the above installation steps again. In the end, I was pleasantly surprised to find that there were no problems during the whole process.

After the installation is complete, configure the environment variables of node.js, just specify the root directory of the installation

Right-click on this computer on the desktop -> Properties -> Advanced System Settings -> Environment Variables -> System Environment Variables -> Path -> Edit -> New -> Paste your own node.js installation directory, here I am: F: \node\node_modules , and finally click OK.

insert image description here
insert image description here

insert image description here
insert image description here
insert image description here

Finally, press the Win + r shortcut key to open the cmd command window, enter node -v, and then we can see the version number of the node.js just installed, and you're done.

insert image description here
Finally, I would like to make a supplement. In fact, the essence of any software installation is nothing more than adding some related files to your computer. If you encounter some clueless and hard-to-solve problems during the normal installation process, there is actually an ultimate solution: that is to find someone who has successfully installed the software and install the relevant software on his computer. Copy the entire file to your computer, and finally you can manually configure the environment variables, and it can be used normally.

that's all.

Guess you like

Origin blog.csdn.net/m0_46571622/article/details/128675193