24 lines
852 B
Markdown
Executable File
24 lines
852 B
Markdown
Executable File
- npm安装以及不使用sudo修复报错
|
|
- fix npm throwing error without sudo
|
|
- ```zsh
|
|
npm config set prefix ~/.npm
|
|
export PATH="$PATH:$HOME/.npm/bin"
|
|
```
|
|
- change the mirrors/use cnpm
|
|
- ```zsh
|
|
npm install -g cnpm --registry=https://registry.npm.taobao.org
|
|
```
|
|
- use nrm to manager resource
|
|
- ```bash
|
|
npm install -g nrm --registry=https://registry.npm.taobao.org
|
|
nrm ls
|
|
-----------------------------------------------------
|
|
npm ---------- https://registry.npmjs.org/
|
|
yarn --------- https://registry.yarnpkg.com/
|
|
tencent ------ https://mirrors.cloud.tencent.com/npm/
|
|
cnpm --------- https://r.cnpmjs.org/
|
|
taobao ------- https://registry.npmmirror.com/
|
|
npmMirror ---- https://skimdb.npmjs.com/registry/
|
|
-----------------------------------------------------
|
|
nrm use taobao
|
|
``` |