Uncaught Error: ES Modules may not assign module.exports or exports.*, Use ESM export syntax
See original GitHub issueAfter upgrading to the latest version of vue-axios, I got the following error message.
***** Fatal JavaScript exception - application has been terminated. ***** NativeScript encountered a fatal error: Uncaught Error: ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ./node_modules/vue-axios/dist/vue-axios.esm.min.js at set(file: app/webpack:/douyou/webpack/runtime/harmony module decorator:7:0 at ./node_modules/vue-axios/dist/vue-axios.esm.min.js(file: app/webpack:/douyou/node_modules/vue-axios/dist/vue-axios.esm.min.js:1:688 at __webpack_require__(file: app/webpack:/douyou/webpack/bootstrap:19:0 at ./app/main.js(file:///app/bundle.js:28:68) at __webpack_require__(file: app/webpack:/douyou/webpack/bootstrap:19:0 at __webpack_exec__(file:///app/bundle.js:12601:39) at (file:///app/bundle.js:12602:221) at __webpack_require__.X(file: app/webpack:/douyou/webpack/runtime/startup entrypoint:6:0 at (file:///app/bundle.js:12602:47) at (file:///app/bundle.js:12607:3) at require(:1:137)
Any suggestions for the above errors? Thanks.
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (8 by maintainers)
Top Related StackOverflow Question
@hotrungnhan Thanks for the description for the possible solution. You are right, I just upgraded @nativescript/webpack from 5.0.0-rc.8 to formal release of 5.0.0. But vue-axios is the only plugin that yielded the errors after the upgrade.
the lastest version using esm export system , which is conflig with some code in src.
Let try commonjs build instead.