weixin_39537397
weixin_39537397
2021-01-07 06:41

v2.0.0.beta.5 will not launch in dev on Windows (any version)

After upgrading to version 2 I am unable to launch a dev instance with vue run electron:serve, no matter which version of the electron package I use.

I have the same issue with Electron versions 5, 6, and 7. I am aware of the 'dark mode issue' for Windows. This is a separate issue.

To Reproduce In windows 8.1 or 10: git clone git.com:beekeeper-studio/beekeeper-studio.git yarn install yarn run electron:serve ( I have confirmed that if you build with electron:build, it works fine )

Expected behavior Dev window should open. In reality: Nothing opens (but on re-builds it force-kills a PID, so there is a process running)

Environment (please complete the following information): - OS and version: Windows 10, Windows 8.1 - node version: 10 - npm version: NA - yarn version (if used): 1.19.1 - vue-cli-plugin-electron-builder version : 2.0.0.beta.5 - electron version: 5, 6, 7 - other vue plugins used: vue-template-compiler - custom config for vcp-electron-builder:


const webpack = require('webpack');

const externals = ['sqlite3', 'sequelize', 'mysql', 'typeorm', 'reflect-metadata', 'cassandra-driver']
module.exports = {
  pluginOptions: {
    electronBuilder: {
      nodeIntegration: true,
      externals,
      builderOptions: {
        appId: "io.beekeeperstudio.desktop",
        productName: "Beekeeper Studio",
        files: ['**/*', 'public/icons/**/*'],
        mac: {
          icon: './public/icons/mac/bk-icon.icns',
          category: "public.app-category.developer-tools"
        },
        linux: {
          icon: './public/icons/png/',
          target: ['AppImage', 'deb', 'rpm', 'snap'],
          category: "Development",
        },
        win: {
          icon: './public/icons/png/512x512.png'
        }
      }
    }
  },
  configureWebpack: {
    plugins: [
      new webpack.IgnorePlugin(/pg-native/, /pg/),
      new webpack.IgnorePlugin(/kerberos/, /cassandra-driver/)
    ],
    node: {
      dns: 'mock'
    },
    module: {
      rules: [
        {
          test: /node_modules[\/\\](iconv-lite)[\/\\].+/,
          resolve: {
            aliasFields: ['main']
          }
        }
      ]
    }
  }
}

  • (if possible) link to your repo: https://github.com/beekeeper-studio/beekeeper-studio Additional context Add any other context about the problem here.

该提问来源于开源项目:nklayman/vue-cli-plugin-electron-builder

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

5条回答

  • weixin_39808143 weixin_39808143 4月前

    This was caused by a breaking change in execa that would cause the electron window to be hidden on Windows. I updated the config so that the window wouldn't be hidden in v2.0.0-beta.6, try that version.

    点赞 评论 复制链接分享
  • weixin_39537397 weixin_39537397 4月前

    You are amazing thanks!

    点赞 评论 复制链接分享
  • weixin_39537397 weixin_39537397 4月前

    So I tried beta6, it launches, but doesn't seem to initialize the Vue app, this also only happens on Windows, on Linux using beta6 it works fine (still).

    点赞 评论 复制链接分享
  • weixin_39537397 weixin_39537397 4月前

    So this seems to be unrelated to this change (probably), but on first-load the windows dev app doesn't work properly, but if I force a reload, it will. No idea why.

    I'll experiment then make a reproducible case if I need to

    点赞 评论 复制链接分享
  • weixin_39808143 weixin_39808143 4月前

    Recently there was another Windows only issue that required a reload before the database would work, might be a similar problem: https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/698. You can also use the workaround there for your issue: https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/698#issuecomment-609544400

    点赞 评论 复制链接分享

相关推荐