DIng
DIng
暂无评论

uniapp vue3 jweixin-module

在Vue3下开发的话报错The following dependencies are imported but could not be resolved,

提示jweixin-module Are they installed?

// #ifdef H5
var jweixin = require('jweixin-module')
// #endif
//在编译的时候这里会报错
11:06:57.077 The following dependencies are imported but could not be resolved:
11:06:57.077   jweixin-module (imported by C:/.../wechat/sdk.js)
11:06:57.079 Are they installed?

解决方法

//改用第三方的
//安装
npm install weixin-js-sdk -S
//然后引入
import * as jweixin from 'weixin-js-sdk'