-
报错信息一
npm ERR! errno ETIMEDOUT
npm ERR! network request to https://registry.npmjs.org/@tarojs%2fcli failed, reason: connect ETIMEDOUT 2606:4700::6810:1b22:443
解决
// 1. 清空缓存
npm cache clean --force
// 2. 切换新源
npm config set registry https://registry.npmmirror.com
// 3. 查看源是否设置成功
npm config get registry
// 4. 可以正常安装需要的工具了
npm insatll xxx
-
报错信息二
@types/sass@1.45.0: This is a stub types definition. sass provides its own type definitions, so you do not need this installed.
解决
npm install -g mirror-config-china
-
问题:安装的版本过高
解决
指定(回到)某个版本安装
npm install -g @tarojs/cli@3.6.28
执行完后查看版本号