Nativescript Vue 从 7 迁移到 8.5.3 (Android 8.5.0) 构建错误

问题描述 投票:0回答:1

我正在尝试使用 Android 8.5.0 从 NS 7 迁移到 NS 8.5.3 webpack 版本是 5.0.14

似乎是 vue-compiler 的一些问题 我会非常感谢任何帮助

System.err: TypeError: Cannot read properties of undefined (reading 'default')
System.err: File: (file: src/webpack:/app-name/webpack/bootstrap:27:0)
System.err:
System.err: StackTrace:
System.err: MyDocumentsPage(file:///data/data/com.some.testId/files/app/bundle.js:25195:112)
System.err:     at ./node_modules/@nativescript/webpack/dist/loaders/nativescript-worker-loader/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/ActionLabel.vue?vue&type=script&lang=js&(file: src/webpack:/app-name/src/components/ActionLabel.vue:30:19)

{
    "name": "app-name",
    "main": "./src/main.js",
    ....
    "dependencies": {
        .....
        "vuex": "^3.5.1",
        "nativescript": "~8.5.3",
        "nativescript-vue": "~2.9.3"
      },
      "devDependencies": {
        "@nativescript/android": "8.5.0",
        "@nativescript/webpack": "~5.0.14",
        "nativescript-vue-template-compiler": "~2.9.3",
        "typescript": "~4.4.0"
      }

webpack.config

module.exports = (env) => {
webpack.init(env);

webpack.chainWebpack(config => {
    config.resolve.alias.set('os', 'os-browserify/browser')
    config.resolve.alias.set('tty', 'tty-browserify')
    config.resolve.alias.set('zlib', 'browserify-zlib')
    config.resolve.alias.set('https', 'https-browserify')
    config.resolve.alias.set('http', 'stream-http')
    config.resolve.alias.set('url', false)
    config.resolve.alias.set('stream', 'stream-browserify')
    config.resolve.alias.set('assert', 'assert')
    config.resolve.alias.set('util', 'util')

});

// Learn how to customize:
// https://docs.nativescript.org/webpack

return webpack.resolveConfig();

};

android build migration nativescript nativescript-vue
1个回答
0
投票

你的 ActionLabel.vue 组件有任何错误

© www.soinside.com 2019 - 2024. All rights reserved.