Windows下搭建NodeJS绿色版开发环境
2017-01-06
博客一直用的是 Jekyll, 突然想玩玩 NodeJS 和 Hexo, 于是就试着搭建一下
绿色环境, 基于 Window8, 不需要管理员权限
重点就是不需要管理员权限, 因此可以在工作区搭建
主要就是本体和 NPM
当前版本:
node -v
v6.9.4
npm -v
4.1.1
官网直接下载最新 Node.exe 就是
NPM Installation1
NPM Installation1
- Download the latest npm release from GitHub ( https://github.com/npm/npm/releases )
- Create folders
c:\nodejs\node_modulesandc:\nodejs\node_modules\npm- Unzip the
downloaded zipfile inc:\nodejs\node_modules\npm folder- Copy
npmandnpm.cmdfiles fromc:\nodejs\node_modules\npm\bintoc:\nodejsfolderOnce setup is done, it can be used to install/uninstall packages locally or globally. For more information on using
npmvisit https://docs.npmjs.com/.As the final step you can add node's folder path
c:\nodejsto thepathenvironment variable so that you don't have to specify full path when runningnode.exeandnpmat command prompt.
直接到他们网站查看用法吧: https://npm.taobao.org/
cmd 里面每次将NodeJS目录当做path就行
SET PATH=C:\Users\xxxx\Desktop\NodeJS;%PATH%
然后Node和NPM命令都可以直接使用了
注意每次回话结束后会取消设置的path, 可以写一个 bat 每次自动运行