【问题标题】:How to fix Electron App not rendering on some Windows Server Machines?如何修复 Electron App 无法在某些 Windows 服务器机器上呈现?
【发布时间】:2019-11-03 02:06:25
【问题描述】:

我在全新的 Windows 10、Windows Server 2016 Standard 和 Windows Server 2012 R2 Build 9600 上安装了我的 Electron Windows 应用程序,它运行良好。与我的 websocket 的连接也正常。

在某些装有 Windows Server 2016 Standard 的计算机上,该应用程序无法按预期运行。我只是得到应用程序的窗口边框,但没有内容也没有菜单。但是我的应用程序的 websocket 连接正在工作。 (我用wireshark检查过)。所以我猜这是一个渲染问题?

遗憾的是,我无法访问存在问题的机器。 我假设缺少相同的包?

出现渲染问题的截图:

电子 5.0.2
电子商店 3.2.0
电子提示 1.3.1

【问题讨论】:

  • 你知道那些服务器上是否安装了 .net 吗?
  • 我得到了安装 .net framework 3.5 和 .net framework 4.6 的信息。

标签: windows electron


【解决方案1】:

我遇到了与您提到的相同的问题,我通过为无法在其上运行的 Windows Server 生成我的 Electron 应用程序的 32 位版本来解决它。

这是我从 package.json 构建的 sn-p,用于生成 64 位和 32 位版本。

    "build": {
    "appId": "com.example.app",
    "productName": "app",
    "copyright": "Copyright © 2019",
    "files": [
      "build/**/*",
      "node_modules/**/*"
    ],
    "directories": {
      "buildResources": "assets"
    },
    "win": {
      "target": [
        {
          "target": "portable",
          "arch": [
            "x64",
            "ia32"
          ]
        }
      ],
      "icon": "assets/app.ico"
    }
   },

【讨论】:

  • 这解决了您的问题吗?对我来说,如果我在 win server 2019 上同时包含两个 arch,则会执行 x64,但它不起作用。如果我只包含 ia32,该应用程序可以在 Win server 2019 上运行
猜你喜欢
  • 1970-01-01
  • 2018-02-21
  • 1970-01-01
  • 2016-03-17
  • 1970-01-01
  • 1970-01-01
  • 2013-02-08
  • 1970-01-01
  • 2015-03-27
相关资源
最近更新 更多