electron-installer-windows icon indicating copy to clipboard operation
electron-installer-windows copied to clipboard

ERROR when building: stuck at creating "example_electron_app.nuspec"

Open h110m opened this issue 4 years ago • 4 comments

What version of electron-installer-windows are you using? 3.0.0

What version of node and npm are you using? node: 12.14.0 npm: 6.13.4

What operating system are you using? Windows x64

Can you compile the example app successfully? yes

What did you do? Please include the configuration you are using for electron-installer-windows. i just added the default scripts to my package.json and run npm run build by "defautl scripts" i mean following:

    "scripts": {
      "clean": "rimraf dist",
      "start": "electron .",
      "bundle:ia32": "electron-packager . --platform win32 --arch ia32 --out dist/",
      "bundle:x64": "electron-packager . --platform win32 --arch x64 --out dist/",
      "exe:ia32": "electron-installer-windows --src dist/example-electron-app-win32-ia32/ --dest dist/installers/ia32/ --config config.json",
      "exe:x64": "electron-installer-windows --src dist/example-electron-app-win32-x64/ --dest dist/installers/x64/ --config config.json",
      "build": "npm run clean && npm run bundle:ia32 && npm run bundle:x64 && npm run exe:ia32 && npm run exe:x64"
    },

What did you expect to happen? it should build the .msi file

What actually happened? i got following error(i am from germany so a couple of words are in german the main thing it says is that the URI is invalid because the uri format cant be defined):

C:\backUP\reactbuild>npm run build

> [email protected] build C:\backUP\reactbuild
> npm run clean && npm run bundle:ia32 && npm run bundle:x64 && npm run exe:ia32 && npm run exe:x64


> [email protected] clean C:\backUP\reactbuild
> rimraf dist


> [email protected] bundle:ia32 C:\backUP\reactbuild
> electron-packager . --platform win32 --arch ia32 --out dist/

Packaging app for platform win32 ia32 using electron v7.3.1
Wrote new app to dist\example-electron-app-win32-ia32

> [email protected] bundle:x64 C:\backUP\reactbuild
> electron-packager . --platform win32 --arch x64 --out dist/

Packaging app for platform win32 x64 using electron v7.3.1
Wrote new app to dist\example-electron-app-win32-x64

> [email protected] exe:ia32 C:\backUP\reactbuild
> electron-installer-windows --src dist/example-electron-app-win32-ia32/ --dest dist/installers/ia32/ --config config.json

Creating package (this may take a while)
ExitCodeError: Command failed with a non-zero return code (1):
C:\backUP\reactbuild\node_modules\electron-installer-windows\vendor\nuget\nuget.exe pack C:\Users\nicht\AppData\Local\Temp\electron-installer-26076pTp1q3PmZrup\example_electron_app_0.0.1_undefined\nuget\example_electron_app.nuspec -BasePath C:\Users\nicht\AppData\Local\Temp\electron-installer-26076pTp1q3PmZrup\example_electron_app_0.0.1_undefined\example_electron_app -OutputDirectory C:\Users\nicht\AppData\Local\Temp\electron-installer-26076pTp1q3PmZrup\example_electron_app_0.0.1_undefined\nuget -NoDefaultExcludes
Es wird versucht, das Paket aus "example_electron_app.nuspec" zu erstellen.

Ung�ltiger URI: Das URI-Format konnte nicht bestimmt werden.
    at ChildProcess.<anonymous> (C:\backUP\reactbuild\node_modules\@malept\cross-spawn-promise\dist\src\index.js:84:24)
    at ChildProcess.emit (events.js:210:5)
    at ChildProcess.cp.emit (C:\backUP\reactbuild\node_modules\@malept\cross-spawn-promise\node_modules\cross-spawn\lib\enoent.js:34:29)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
  cmd: 'C:\\backUP\\reactbuild\\node_modules\\electron-installer-windows\\vendor\\nuget\\nuget.exe',
  args: [
    'pack',
    'C:\\Users\\nicht\\AppData\\Local\\Temp\\electron-installer-26076pTp1q3PmZrup\\example_electron_app_0.0.1_undefined\\nuget\\example_electron_app.nuspec',
    '-BasePath',
    'C:\\Users\\nicht\\AppData\\Local\\Temp\\electron-installer-26076pTp1q3PmZrup\\example_electron_app_0.0.1_undefined\\example_electron_app',
    '-OutputDirectory',
    'C:\\Users\\nicht\\AppData\\Local\\Temp\\electron-installer-26076pTp1q3PmZrup\\example_electron_app_0.0.1_undefined\\nuget',
    '-NoDefaultExcludes'
  ],
  stdout: 'Es wird versucht, das Paket aus "example_electron_app.nuspec" zu erstellen.\r\n',
  stderr: 'Ung�ltiger URI: Das URI-Format konnte nicht bestimmt werden.\r\n',
  code: 1
} Error: Command failed with a non-zero return code (1):
C:\backUP\reactbuild\node_modules\electron-installer-windows\vendor\nuget\nuget.exe pack C:\Users\nicht\AppData\Local\Temp\electron-installer-26076pTp1q3PmZrup\example_electron_app_0.0.1_undefined\nuget\example_electron_app.nuspec -BasePath C:\Users\nicht\AppData\Local\Temp\electron-installer-26076pTp1q3PmZrup\example_electron_app_0.0.1_undefined\example_electron_app -OutputDirectory C:\Users\nicht\AppData\Local\Temp\electron-installer-26076pTp1q3PmZrup\example_electron_app_0.0.1_undefined\nuget -NoDefaultExcludes
Es wird versucht, das Paket aus "example_electron_app.nuspec" zu erstellen.

Ung�ltiger URI: Das URI-Format konnte nicht bestimmt werden.
    at ChildProcess.<anonymous> (C:\backUP\reactbuild\node_modules\@malept\cross-spawn-promise\dist\src\index.js:84:24)
    at ChildProcess.emit (events.js:210:5)
    at ChildProcess.cp.emit (C:\backUP\reactbuild\node_modules\@malept\cross-spawn-promise\node_modules\cross-spawn\lib\enoent.js:34:29)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] exe:ia32: `electron-installer-windows --src dist/example-electron-app-win32-ia32/ --dest dist/installers/ia32/ --config config.json`npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] exe:ia32 script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  ],
  stdout: 'Es wird versucht, das Paket aus "example_electron_app.nuspec" zu erstellen.\r\n',
  stderr: 'Ung�ltiger URI: Das URI-Format konnte nicht bestimmt werden.\r\n',
  code: 1
} Error: Command failed with a non-zero return code (1):
C:\backUP\reactbuild\node_modules\electron-installer-windows\vendor\nuget\nuget.exe pack C:\Users\nicht\AppData\Local\Temp\electron-installer-26076pTp1q3PmZrup\example_electron_app_0.0.1_undefined\nuget\example_electron_app.nuspec -BasePath C:\Users\nicht\AppData\Local\Temp\electron-installer-26076pTp1q3PmZrup\example_electron_app_0.0.1_undefined\example_electron_app -OutputDirectory C:\Users\nicht\AppData\Local\Temp\electron-installer-26076pTp1q3PmZrup\example_electron_app_0.0.1_undefined\nuget -NoDefaultExcludes
Es wird versucht, das Paket aus "example_electron_app.nuspec" zu erstellen.

Ung�ltiger URI: Das URI-Format konnte nicht bestimmt werden.
    at ChildProcess.<anonymous> (C:\backUP\reactbuild\node_modules\@malept\cross-spawn-promise\dist\src\index.js:84:24)
    at ChildProcess.emit (events.js:210:5)
    at ChildProcess.cp.emit (C:\backUP\reactbuild\node_modules\@malept\cross-spawn-promise\node_modules\cross-spawn\lib\enoent.js:34:29)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] exe:ia32: `electron-installer-windows --src dist/example-electron-app-win32-ia32/ --dest dist/installers/ia32/ --config config.json`npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] exe:ia32 script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\nicht\AppData\Roaming\npm-cache\_logs\2020-06-17T19_54_00_723Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `npm run clean && npm run bundle:ia32 && npm run bundle:x64 && npm run exe:ia32 && npm run exe:x64`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\nicht\AppData\Roaming\npm-cache\_logs\2020-06-17T19_54_00_754Z-debug.log

C:\backUP\reactbuild>

What you think went wrong? maybe its because its an electron react typescript app but i dont think that is the problem

h110m avatar Jun 17 '20 20:06 h110m

This is probably related to https://github.com/electron-userland/electron-installer-windows/issues/294#issuecomment-550478818 As mentioned in the issue template, Please include the configuration you are using for electron-installer-windows (your config.json As mentioned in that comment, running this tool with DEBUG=electron-installer-windows will give us more details. Nonetheless, it's very likely that you have filenames with spaces in them, probably your icons/images.

fcastilloec avatar Jun 17 '20 22:06 fcastilloec

This is probably related to #294 (comment) As mentioned in the issue template, Please include the configuration you are using for electron-installer-windows (your config.json As mentioned in that comment, running this tool with DEBUG=electron-installer-windows will give us more details. Nonetheless, it's very likely that you have filenames with spaces in them, probably your icons/images.

could you explain to me how exactly i run it in DEBUG mode my config.json looks like this:

{
    "tags": [
      "Utility"
    ]
  }

i dont have any icons included i also dont know if there are any "wrong spaces" that i set in any of my files

h110m avatar Jun 18 '20 04:06 h110m

Any updates? I'm dealing with the same issue and cannot find any files with spaces

kevinjosethomas avatar Apr 12 '21 03:04 kevinjosethomas

@trustedmercury we still need an output of the debugging to see what's happening. As I mentioned in an earlier post, just need to prepend DEBUG=electron-installer-windows to the command you're running. If you're using powershell or similar windows shells see this on how to set the DEBUG variable.

I believe that this is not an issue with our tool, but rather Squirrel and Windows itself and how they handle spaces in their filenames. We might not be able to do anything about it.

fcastilloec avatar Apr 12 '21 17:04 fcastilloec

Sorry guys im using electron forge since end of 2020 so the error doesn't happen anymore It also looks like i deleted the original files / project :/ I will close this for now

If someone still get's this error feel free to reopen and attach the debug log

h110m avatar Oct 10 '22 18:10 h110m