Node.JS installation notes
Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient.
Node.js' package ecosystem, npm, is the largest ecosystem of open source libraries in the world.
1. official website to download the .msi file
官网地址 https://nodejs.org
2. Install the program
双击node-v6.9.5-x64.msi进行安装。
点击下一步
程序安装的一个好的习惯是, 把程序安装到C盘或者D盘的app目录下面。
比如这次,我们把Node.js安装到 c盘app目录下的C:\app\nodejs
3. Verify that the installed version
打开命令行
node -v
npm -v
4. node.js library path, and configuration cache path
启动cmd,输入
npm config set prefix "C:\node_lib\node_global"
以及
npm config set cache "C:\node_lib\node_cache"
查看现在的路径
npm config get prefix
npm config get cache
The mirror is provided Taobao
npm config set registry http://registry.npm.taobao.org/
修改源地址为官方源
npm config set registry https://registry.npmjs.org/
查看现在的源
npm config get registry
7. Set Environment Variables
NODE_PATH
C:\node_lib\node_global\node_modules
PATH
C:\node_lib\node_global\
8. You can have fun using
# 全局安装webpack
npm install webpack -g