开发微信小程序想引入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 则表示设置镜像地址成功

点赞(0) 打赏

评论列表 共有 0 条评论

暂无评论

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部