Skip to content

Commit

Permalink
update nodejs section
Browse files Browse the repository at this point in the history
  • Loading branch information
hedzr committed Jul 21, 2024
1 parent 1c58e2c commit 1b6ad19
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1106,8 +1106,8 @@ sudo dnf makecache
可以更换镜像:
- 阿里:`yarn config set registry https://registry.npmmirror.com`
- 华为:`yarn config set registry https://mirrors.huaweicloud.com/repository/npm/`
- Node-Sass:`npm config set sass_binary_site https://mirrors.huaweicloud.com/node-sass/`
- 华为: `yarn config set registry https://mirrors.huaweicloud.com/repository/npm/`
- Node-Sass: `npm config set sass_binary_site https://mirrors.huaweicloud.com/node-sass/`
```bash
npm config delete registry
Expand All @@ -1119,6 +1119,34 @@ yarn config delete registry
yarn config set registry
```
使用 npm 的示例如下:
```bash
cd nodejs-project-a
# install fnm
which fnm 1>/dev/null 2>&1 || curl -fsSL https://fnm.vercel.app/install | bash
eval $(~/.local/share/fnm/fnm env)
fnm --version
# install nodejs
[ -f .node-version ] && cat .node-version || echo v20.13.1 >.node-version
fnm install
which node && which npm
node -v && npm -v
# setup mirror site for nodejs
npm config set registry http://registry.npm.taobao.org/
# install pnpm
npm i -g npm
npm i -g pnpm
npm i -g yarn
```
DONE.
### openSUSE 软件源
正常情况下,openSUSE 内置了速度测试([MirrorBrain](https://zh.opensuse.org/MirrorBrain) 技术)以便自动选择最佳的镜像站点来下载软件包索引、以及在安装时下载软件包本身。
Expand Down

0 comments on commit 1b6ad19

Please sign in to comment.