设置npm安装模块目录<nodejs>

时间:2016-02-09 17:22:36   收藏:0   阅读:265

nodejs安装模块命令:

npm install <input_name>      # 本地安装
npm install <input_name> -g   # 全局安装

1.npm install <input_name> -g --模块安装到全局目录

npm config set prefix  --设置全局目录路径
npm config get prefix  --获取当前设置全局目录。

 

2.npm install <input_name>     --模块安装到当前命令行所在目录

D:\>npm install node-static
node-static@0.7.7 node_modules\node-static
├── mime@1.3.4
├── colors@1.1.2
└── optimist@0.6.1 (wordwrap@0.0.3, minimist@0.0.10)

 

原文:http://www.cnblogs.com/lmf-techniques/p/5185611.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!