Skip to content

Commit

Permalink
fix: 更新源的说明
Browse files Browse the repository at this point in the history
  • Loading branch information
hailaz committed Nov 26, 2024
1 parent 734d6ed commit 993e83b
Show file tree
Hide file tree
Showing 3 changed files with 13,032 additions and 13,020 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmjs.org/
15 changes: 13 additions & 2 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,23 @@ yarn start
# 构建
yarn build

# 更换源
```

```shell
# 更换源
# .npmrc 文件中指定优先级最高
# 其次是 npm config get registry
# 最后是 yarn config get registry
# 优先级:.npmrc > npm config > yarn config
npm config get registry
npm config set registry https://registry.npmjs.org

yarn config get registry
yarn config set registry https://registry.npmjs.org

rm yarn.lock
yarn install --force
# 上面的命令还是更换不了,先手动替换
# 实在不行可以手动替换
sed -i 's|https://mirrors.tencent.com/npm/|https://registry.npmjs.org/|g' yarn.lock
```

Expand Down
Loading

0 comments on commit 993e83b

Please sign in to comment.