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)

 

相关文章:

  • 2021-11-24
  • 2021-07-19
  • 2021-07-29
  • 2021-12-23
  • 2021-06-28
  • 2021-06-02
  • 2021-11-24
猜你喜欢
  • 2021-07-10
  • 2022-12-23
  • 2021-04-28
  • 2021-09-22
  • 2021-03-31
  • 2022-12-23
  • 2021-12-06
相关资源
相似解决方案