我正在尝试使用打包的电子应用程序(使用电子打包器打包)创建安装程序。但是,我不断收到以下错误Invalid URI: The format of the URI could not be determined
经过大量搜索后,这个问题似乎源于一条不正确的iconUrl
路径,但无论我是否传递一个(http链接到任何图标),问题仍然存在。
使用JSON文件存储配置(使用有效的iconUrl
),然后将其传递给CLI命令会导致相同的错误。
以下是错误的全文:
Here is the full text of the error:
C:\Users\OLS\Documents\school5.electrify.dist>electron-installer-windows --src OLS-Educ2-win32-x64/ --dest dist/installers/
(node:1396) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
Creating package (this may take a while)
Error: Error creating package: Error executing file (1):
C:\Users\OLS\AppData\Roaming\npm\node_modules\electron-installer-windows\vendor\nuget\NuGet.exe pack C:\Users\OLS\AppData\Local\Temp\electron-11676-1396-6ja5k0.9hjn8w7b9\OLS-Educ2_0.1.0\nuget\OLS-Educ2.nuspec -BasePath C:\Users\OLS\AppData\Local\Temp\electron-11676-1396-6ja5k0.9hjn8w7b9\OLS-Educ2_0.1.0\OLS-Educ2 -OutputDirectory C:\Users\OLS\AppData\Local\Temp\electron-11676-1396-6ja5k0.9hjn8w7b9\OLS-Educ2_0.1.0\nuget -NoDefaultExcludes
Invalid URI: The format of the URI could not be determined.
at C:\Users\OLS\AppData\Roaming\npm\node_modules\electron-installer-windows\src\installer.js:273:21
at ChildProcess.<anonymous> (C:\Users\OLS\AppData\Roaming\npm\node_modules\electron-installer-windows\src\installer.js:62:5)
at emitTwo (events.js:111:20)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:852:16)
at Socket.<anonymous> (internal/child_process.js:323:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:492:12) 'Error: Error creating package: Error executing file (1): \nC:\\Users\\OLS\\AppData\\Roaming\\npm\\node_modules\\electron-installer-windows\\vendor\\nuget\\NuGet.exe pack C:\\Users\\OLS\\AppData\\Local\\Temp\\electron-11676-1396-6ja5k0.9hjn8w7b9\\OLS-Educ2_0.1.0\\nuget\\OLS-Educ2.nuspec -BasePath C:\\Users\\OLS\\AppData\\Local\\Temp\\electron-11676-1396-6ja5k0.9hjn8w7b9\\OLS-Educ2_0.1.0\\OLS-Educ2 -OutputDirectory C:\\Users\\OLS\\AppData\\Local\\Temp\\electron-11676-1396-6ja5k0.9hjn8w7b9\\OLS-Educ2_0.1.0\\nuget -NoDefaultExcludes\nInvalid URI: The format of the URI could not be determined.\r\n\n at C:\\Users\\OLS\\AppData\\Roaming\\npm\\node_modules\\electron-installer-windows\\src\\installer.js:273:21\n at ChildProcess.<anonymous> (C:\\Users\\OLS\\AppData\\Roaming\\npm\\node_modules\\electron-installer-windows\\src\\installer.js:62:5)\n at emitTwo (events.js:111:20)\n at ChildProcess.emit (events.js:191:7)\n at maybeClose (internal/child_process.js:852:16)\n at Socket.<anonymous> (internal/child_process.js:323:11)\n at emitOne (events.js:96:13)\n at Socket.emit (events.js:188:7)\n at Pipe._handle.close [as _onclose] (net.js:492:12)'