electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.7k stars 1.74k forks source link

Error 7za ENOENT #301

Closed maxcnunes closed 8 years ago

maxcnunes commented 8 years ago

node: v5.0.0 electron: v0.37.5 builder: v3.5.0

During the build for OSX I was getting this error:

Packaging app for platform darwin x64 using electron v0.37.5
App is not signed: CSC_LINK or CSC_NAME are not specified
Creating DMG
Creating ZIP for Squirrel.Mac
Error: spawn /Users/maxcnunes/Development/sqlectron/sqlectron-gui/node_modules/electron-builder/node_modules/7zip-bin/node_modules/7zip-bin-osx/7za ENOENT
    at exports._errnoException (util.js:860:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at doNTCallback2 (node.js:450:9)
    at process._tickCallback (node.js:364:17)

Which made think was something related to 7za and it was missing in my machine. Because there were some issues opened earlier related to it.

But after some debugging I found out everything was ok with 7za. The problem was because I was using an wrong configuration "dist:osx": "build --platform osx", (platform osx instead of darwin).

If there was a validation before executing the 7za. We could print a better error message. At least print Output directory <out> does not exists. Seems like a wrong configuration..

I could implement this pull request if it makes sense.

develar commented 8 years ago

Relates: #27.

Output directory does not exists. Seems like a wrong configuration..

Must be to avoid such unclear errors.

develar commented 8 years ago

platform osx instead of darwin

Approved — https://github.com/electron-userland/electron-builder/issues/27#issuecomment-208772219 So, it will be implemented soon.

maxcnunes commented 8 years ago

The error message would include the <output> directory. At least would be more clear than the current one. And that was an initial idea. We could change the error message to be more specific about the problem. But since it will accept different platform names. I guess this problem will not occur anymore.