使用微信小程序构建npm,出现程序报错并且没有显示文章!

237 阅读1分钟

使用微信小程序构建npm,出现程序报错并且没有显示文章!

在写微信小程序是经常会用到npm安装,最近我在安装vant/weapp遇到的问题: VM638:1150 页面【miniprogram_npm/vant-weapp/notice-bar/index]错误: Error: module "miniprogram_npm/vant-weapp/common/component.js" is not defined 通过翻译得出是文件错误,最后我反复试验,发现是最新版本构建是没有启用npm, 在右上角的详情里面点击构建就行!

image.png

如果版本过高也可以降版本就可以解决了!