Skip to content

基础工具

1
2
3
4
5
brew install node
➜  ~ node --version
v21.6.1
➜  ~ npm --version
10.2.4

npm

https://www.npmjs.cn/

https://www.npmjs.com/

1
2
➜  ~ npm --version
6.14.8

更新 npm: npm install -g npm

ubuntu 安装:apt install npm -y

加速

1
2
npm config set registry https://registry.npmmirror.com
npm config list

出现奇怪错误

在执行npm run dev或者npm run serve时出现奇怪错误:

1
2
3
rm -rf node_modules package-lock.json
npm install
npm run serve

node

https://nodejs.org/zh-cn/

1
brew reinstall node

brew upgrade node

1
2
➜  ~ node --version
v12.4.0

node版本管理: nvm

https://github.com/nvm-sh/nvm

yarn

https://classic.yarnpkg.com/zh-Hans/

mac安装: brew install yarn
升级: brew upgrade yarn

查看版本: yarn --version

1
2
3
4
5
yarn config set registry https://registry.npm.taobao.org --global   

yarn config set disturl https://npm.taobao.org/dist  --global

yarn config list

其他

https://codepen.io/