Web笔记··By/蜜汁炒酸奶

NodeJS常用笔记

修改全局路径

/**设置全局路径**/
npm config set prefix “D:\SoftWare\NodeJS_Redis\NodeJS\node_modules\node_global”
/**设置全局cache路径**/
npm config set cache “D:\SoftWare\NodeJS_Redis\NodeJS\node_modules\node_cache”
1
2
3
4

版本升级

npm i -g npm to update
1

查看配置

npm config ls
1

nrm管理npm源

一:安装nrm

npm install -g nrm
1

二:常用命令

  • 1.nrm ls 查看已有的源

  • 2.nrm add <源名称> <源地址> //新增源

  • 3.nrm use <源名称>. //切换源

预览
Loading comments...
0 条评论

暂无数据

example
预览