您的位置:首页 > Web前端 > Node.js

node命令

2016-05-31 10:58 423 查看



了解全局

npm root -g
 查看在你的系统中全局的路径。

我们也可以通过

npm config ls -l | grep prefix
 (*nix) 系统中

或是
 npm config get prefix
 

来查看全局路径。

是的  
prefix
 字段就是全局 
base
path


怎么设置全局路径呢?
# in *nix
npm config set prefix /path/to/global

# in windows
npm config set prefix C:\\Users\\pc\\global



了解命令行

在使用node的时候,用npm安装了很多软件,过一段时间没有使用就会忘记,怎么查看自己全局安装过的包,用命令

npm list -g --depth 0
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  node 命令行