Use in vue3:
var jweixin = require('jweixin-module');
It will be compiled with the error: require is not defined, there is no require module, change to import, because jweixin-module does not support export writing, so the introduction can not succeed.
Solution:
Use a third-party wrapper jdk: weixin-js-sdk
npm install weixin-js-sdk -S
import jweixin from 'weixin-js-sdk'
Read More:
- [Solved] VUE npm install Error: Module build failed: Error: ENOENT: no such file or directory, scandir
- [Solved] Error: Cannot find module ‘@/views/xxx‘ at webpackEmptyContext
- Node.js Error: Error: Cannot find module ‘express‘ [How to Solve]
- How to Solve Vue3 Import lodash error
- [Solved] Uncaught SyntaxError: Cannot use import statement outside a module
- Vue Dynamic Display Picture Error 404: Not Found [How to Solve]
- [Solved] Vue Project Error: Error: Cannot find module ‘webpack‘ Require stack以及Error: Rule can only have one resource so
- [Solved] ERROR Error: Cannot find module ‘vue-loader-v16/package.json‘
- Error: Cannot find module ‘./application‘ [How to Solve]
- [Solved] SyntaxError: Cannot use import statement outside a module
- [Solved] npm Error: Class extends value undefined is not a constructor or null
- Vuepress build error: window is not defined [How to Solve]
- [Solved] Vue calls style loader error: Module build failed: CssSyntaxError
- [Solved] SyntaxError: Cannot use import statement outside a module
- [Solved] ERROR in ./src/main.ts Module not found: Error: Can‘t resolve ‘xxx‘
- js: SyntaxError: Cannot use import statement outside a module
- [Solved] Angular basic create component error: Is it missing an @NgModule annotation
- [Solved] Error:Plugin/Preset files are not allowed to export objects, only functions
- [Solved] electron Use remote Error: Cannot read properties of undefined (reading ‘BrowserWindow‘)
- [Solved] Uncaught Error: @electron/remote is disabled for this WebContents