NodeJS

  • 563 字
  • null 次阅读
  • null 条评论

NodeJS

环境变量:

1
2
3
NODE_PATH=D:\soft\nodejs\node_global\node_modules
PATH+=D:\soft\nodejs
PATH+=D:\soft\nodejs\node_global

NPM配置:

1
2
3
npm config set prefix "D:\soft\nodejs\node_global"
npm config set cache "D:\soft\nodejs\node_cache"
npm config set registry "https://registry.npm.taobao.org"

YARN

1
2
yarn config set global-folder "D:\soft\nodejs\yarn_global"
yarn config set cache-folder "D:\soft\nodejs\yarn_cache"

更新NPM:

1
2
3
4
npm i -g npm
```

### 使用rimraf 删除 node_modudles:

npm i -g rimraf
rimraf node_modules
```

大冰块
非常感谢您的喜欢!
大冰块