在 Windows 下安装 Node 环境

原创
2017/03/20 11:03
阅读数 299

想用 webstorm ,无奈新建 node 项目必须指定 node interpreter,之前的学习都是使用 subtext直接同步服务器上运行,特此记录一下安装过程,方便以后参照。

下载 node 点此链接 

解压值任意目录,将解压后的路径添加到环境变量 Path 中(为方便命令行使用运行 node)

查看版本

C:\Users\skye>node --version
v6.10.0

查看 npm 是否正常

C:\Users\skye>npm

Usage: npm <command>

where <command> is one of:
    access, adduser, bin, bugs, c, cache, completion, config,
    ddp, dedupe, deprecate, dist-tag, docs, edit, explore, get,
    help, help-search, i, init, install, install-test, it, link,
    list, ln, login, logout, ls, outdated, owner, pack, ping,
    prefix, prune, publish, rb, rebuild, repo, restart, root,
    run, run-script, s, se, search, set, shrinkwrap, star,
    stars, start, stop, t, tag, team, test, tst, un, uninstall,
    unpublish, unstar, up, update, v, version, view, whoami

npm <cmd> -h     quick help on <cmd>
npm -l           display full usage info
npm help <term>  search for help on <term>
npm help npm     involved overview

Specify configs in the ini-formatted file:
    C:\Users\skye\.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config

npm@3.10.10 D:\develop\node-v6.10.0-win-x64\node_modules\npm

一半我们会需要安装一个 express-generator 来生成模板文件

C:\Users\skye>npm install -g express-generator
D:\develop\node-v6.10.0-win-x64\express -> D:\develop\node-v6.10.0-win-x64\node_modules\express-generator\bin\express
D:\develop\node-v6.10.0-win-x64
`-- express-generator@4.14.1
  +-- commander@2.9.0
  | `-- graceful-readlink@1.0.1
  +-- mkdirp@0.5.1
  | `-- minimist@0.0.8
  `-- sorted-object@2.0.1

 

展开阅读全文
加载中

作者的其它热门文章

打赏
0
0 收藏
分享
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部