Electron-Installer-Windows:无效的 URI:无法确定 URI 的格式

Electron-Installer-Windows : Invalid URI: The format of the URI could not be determined

我正在尝试创建 .exe 文件,以便能够 运行 我在 windows 环境中修复的应用程序。 首先,我使用命令:

electron-packager . app --platform win32 --arch x64 --out dist/  

它创建了 dist 文件夹,如下所述: https://github.com/electron-userland/electron-packager 最后,我 运行 命令:

electron-installer-windows --src ./dist/app-win32-x64 --config config.json/

(如此处所述: https://github.com/unindented/electron-installer-windows)。 config.json 文件包含: { "authors": ["auth"], "dest": "/dist/installers/" }

Invalid URI: The format of the URI could not be determined.

我也看到了这个问题:Electron Atom APP : Invalid URI: The format of the URI could not be determined 但它似乎不起作用。 有什么建议吗?谢谢。

我认为此错误是由于尝试创建安装程序时路径不正确造成的。

我仍然无法验证这一点,但是如果您有 node_modules 文件夹及其嵌套依赖项并且您有 超过 260 个字符的路径 可能只是问题所在。

如果我能够确认这一点或得到解决方案,我会post在这里。

有同样的问题,通过在 package.json 文件中为作者设置正确的 "url" 字段解决了这个问题。