快速解决使用Vant Weapp出现的安装不成功问题
输入npm i @vant/weapp -S --production出现下面的报错
npm WARN config production Use `--omit=dev` instead. npm ERR! code CERT_HAS_EXPIRED npm ERR! errno CERT_HAS_EXPIRED npm ERR! request to https://registry.npm.taobao.org/@vant%2fweapp failed, reason: certificate has expired
npm ERR! A complete log of this run can be found in: F:\nodeResp\cache\_logs\2025-01-18T06_40_59_166Z-debug-0.log
用管理员权限打开cmd
转到你的小程序目录下面
然后在cmd窗口中查看是否安装cnpm
\
若没安装,运行下面程序
npm install -g cnpm --registry=https://registry.npmmirror.com
安装完了查看一下(成功)
然后运行下面程序就可以直接安装vant/weapp
cnpm i @vant/weapp -S --production
这样就安装完了
npm i @vant/weapp@1.11.7