使用npm下载包提示idealTree:pxx: sill idealTree buildDeps的解决方法

开发微信小程序想引入Vant Weapp框架,执行npm命令:npm i @vant/weapp -S --production 时一直提示 idealTree:pxx: sill idealTree buildDeps。注意pxx是我微信小程序项目的根目录。

原因

镜像问题导致的。默认镜像地址https://registry.npmjs.com在国外,大家懂的,不容易连接上。大家以前用的淘宝镜像https://registry.npm.taibao.org已经过期了

解决办法

把镜像地址设置为最新的淘宝地址 https://registry.npmmirror.com

设置镜像地址的npm命令为:npm config set registry https://registry.npmmirror.com

查看镜像地址是否设置成功的命令:npm config get registry

如果返回提示 https://registry.npmmirror.com 则表示设置镜像地址成功

相关推荐
工呈士13 分钟前
MobX与响应式编程实践
前端·react.js·面试
嘉小华14 分钟前
Android Lifecycle 使用
前端
Sherry00716 分钟前
实时数据传输协议:WebSocket vs MQTT
前端·websocket
然我16 分钟前
JavaScript的OOP独特之道:从原型继承到class语法
前端·javascript·html
腹黑天蝎座18 分钟前
如何更好的实现业务中图片批量上传需求
前端
嘉小华19 分钟前
Android Lifecycle 源码解析
前端
不_喜20 分钟前
游戏开发零散知识点和优化记录
前端
去伪存真29 分钟前
提交规范靠吼没用,看我用“shell+husky螺丝刀”,一键给40多个项目上锁
前端·eslint
翠莲39 分钟前
vue3+TS+eslint9配置
前端·代码规范
发渐稀41 分钟前
vue项目引入tailwindcss
前端·javascript·vue.js