简体   繁体   English

如何在Windows 10上安装Node.js?

[英]How to install Node.js on Windows 10?

I tried to install Node.js on the Windows 10 64 bit using installer. 我尝试使用安装程序在Windows 10 64位上安装Node.js.

When I run installe.exe I accept rules and push next button, in any case I get the following notification: 当我运行installe.exe时,我接受规则并按下下一个按钮,无论如何我得到以下通知: 在此输入图像描述

When I tried to set path of downloaded install file: 当我尝试设置下载安装文件的路径时:

在此输入图像描述

And get this error again. 并再次得到此错误。

@Babaev From what you said, I guess its a problem related to path issue or rather the .msi file may have been corrupted on download. @Babaev 根据你的说法,我猜它是一个与路径问题有关的问题,或者说.msi文件可能在下载时已损坏。 Try the windows binary that is .exe file from https://nodejs.org/en/download/ let's say we have the node.exe file located in the folder c:\\nodejs. 尝试从https://nodejs.org/en/download/获取 .exe文件的windows二进制文件,假设我们将node.exe文件放在文件夹c:\\ nodejs中。 Now to setup npm- 现在设置npm-

Step 1: Download the latest npm release from GitHub( https://github.com/npm/npm/releases ) Step 2:Create folders c:\\nodejs\\node_modules and :\\nodejs\\node_modules\\npm 步骤1:从GitHub下载最新的npm版本( https://github.com/npm/npm/releases )步骤2:创建文件夹c:\\ nodejs \\ node_modules和:\\ nodejs \\ node_modules \\ npm
Step 3:Unzip the downloaded zip file in c:\\nodejs\\node_modules\\npm folder Step 4:Copy npm and npm.cmd files from c:\\nodejs\\node_modules\\npm\\bin to c:\\nodejs folder. 步骤3:将下载的zip文件解压缩到c:\\ nodejs \\ node_modules \\ npm文件夹中步骤4:将npm和npm.cmd文件从c:\\ nodejs \\ node_modules \\ npm \\ bin复制到c:\\ nodejs文件夹。
Step 5: As the final step you can add node's folder pathc:\\nodejs to the path environment variable so that you don't have to specify full path when running node.exe and npm at command prompt. 步骤5:作为最后一步,您可以将节点的文件夹pathc:\\ nodejs添加到路径环境变量中,这样您就不必在命令提示符下运行node.exe和npm时指定完整路径。

Hope this helps :) 希望这可以帮助 :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM