Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example app terminates immediately on OSX #42

Closed
tomprogers opened this issue Aug 2, 2015 · 8 comments
Closed

Example app terminates immediately on OSX #42

tomprogers opened this issue Aug 2, 2015 · 8 comments

Comments

@tomprogers
Copy link

I clone this project, cd into the examples directory, run what I believe are all the build steps, and then run the demo app as instructed. The app executes and terminates immediately, without adding anything to the menubar, although the script obviously runs. The built app throws immediately and terminates.

My steps:

[Sun 12:48:05] projects $ git clone https://github.com/maxogden/menubar.git skynet
Cloning into 'skynet'...
...
Checking connectivity... done.
[Sun 12:48:30] projects $ cd skynet/example/
# add "console.log('LINE 1');" as first line of main.js
[Sun 12:48:36] example $ nvm use; npm i; npm start
No .nvmrc file found

npm WARN package.json example-menubar-app@1.0.0 No repository field.
npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.0","npm":"2.5.1"})
-
> electron-prebuilt@0.30.0 postinstall /Users/mdyson/projects/skynet/example/node_modules/electron-prebuilt
> node install.js

menubar@2.0.17 node_modules/menubar
└── extend@2.0.1

electron-packager@4.2.0 node_modules/electron-packager
├── mv@2.1.1
├── rcedit@0.3.0
├── minimist@1.1.2
├── ncp@2.0.0
├── mkdirp@0.5.1 (minimist@0.0.8)
├── asar@0.6.1 (chromium-pickle-js@0.1.0, commander@2.3.0, glob@5.0.14, cuint@0.1.5, minimatch@2.0.4)
├── rimraf@2.4.2 (glob@5.0.14)
├── extract-zip@1.0.3 (debug@0.7.4, minimist@0.1.0, async@0.9.0, yauzl@2.3.1, mkdirp@0.5.0, through2@0.6.3, concat-stream@1.5.0)
├── electron-download@1.0.7 (path-exists@1.0.0, home-path@0.1.2, debug@2.2.0, nugget@1.5.4)
└── plist@1.1.0 (util-deprecate@1.0.0, base64-js@0.0.6, xmldom@0.1.19, xmlbuilder@2.2.1)

electron-prebuilt@0.30.0 node_modules/electron-prebuilt
├── extract-zip@1.0.3 (debug@0.7.4, minimist@0.1.0, async@0.9.0, yauzl@2.3.1, mkdirp@0.5.0, through2@0.6.3, concat-stream@1.5.0)
└── electron-download@1.0.7 (path-exists@1.0.0, home-path@0.1.2, mkdirp@0.5.1, debug@2.2.0, mv@2.1.1, nugget@1.5.4)

> example-menubar-app@1.0.0 start /Users/mdyson/projects/skynet/example
> electron .

LINE 1
[Sun 12:57:52] example $

I also built the packaged app. When I run it, it throws a js error immediately and terminates.

My steps:

[Sun 12:48:59] example $ npm run build

> example-menubar-app@1.0.0 build /Users/mdyson/projects/skynet/example
> electron-packager . Example --platform=darwin --arch=x64 --version=0.26.0 --ignore=node_modules/electron --icon=Icon.icns

Packaging app for platform darwin x64 using electron v0.26.0
Wrote new app to /Users/mdyson/projects/skynet/example/Example.app
[Sun 12:52:16] example $ open Example.app

The output:

A JavaScript error occured in the browser process

Uncaught Exception:
TypeError: app.getAppPath is not a function
    at create (/Users/mdyson/projects/skynet/example/Example.app/Contents/Resources/app/node_modules/menubar/index.js:12:53)
    at Object.<anonymous> (/Users/mdyson/projects/skynet/example/Example.app/Contents/Resources/app/main.js:3:10)
    at Module._compile (module.js:418:26)
    at Object.Module._extensions..js (module.js:436:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:298:12)
    at Object.<anonymous> (/Users/mdyson/projects/skynet/example/Example.app/Contents/Resources/atom.asar/browser/lib/init.js:104:10)
    at Object.<anonymous> (/Users/mdyson/projects/skynet/example/Example.app/Contents/Resources/atom.asar/browser/lib/init.js:106:4)
    at Module._compile (module.js:418:26)
    at Object.Module._extensions..js (module.js:436:10)

I'm not sure how to debug this further, but if I learn anything more I'll post it.

@jenslind
Copy link
Collaborator

jenslind commented Aug 2, 2015

Hello!

Looks like you are running electron 0.26.0. getAppPath was implemented first in 0.30.0. :)

@tomprogers
Copy link
Author

That looks correct. But it appears that example/package.json is correctly declaring its dependency on 0.30.0:

  "devDependencies": {
    "electron-packager": "^4.0.2",
    "electron-prebuilt": "0.30.0"
  },

It looks like the build command is out of date:

  "scripts": {
    "build": "electron-packager . Example --platform=darwin --arch=x64 --version=0.26.0 --ignore=node_modules/electron --icon=Icon.icns",
    "start": "electron ."
  }

But when I ran with --version=0.30.0, I got the following error:

[Sun 13:27:39] example $ npm run build

> example-menubar-app@1.0.0 build /Users/mdyson/projects/skynet/example
> electron-packager . Example --platform=darwin --arch=x64 --version=0.30.0 --ignore=node_modules/electron --icon=Icon.icns

Packaging app for platform darwin x64 using electron v0.30.0
[ { [Error: ENOENT, stat '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Frameworks']
    errno: -2,
    code: 'ENOENT',
    path: '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Frameworks' },
  { [Error: ENOENT, stat '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Libraries/Libraries']
    errno: -2,
    code: 'ENOENT',
    path: '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Libraries/Libraries' },
  { [Error: ENOENT, stat '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/Libraries']
    errno: -2,
    code: 'ENOENT',
    path: '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/Libraries' },
  { [Error: ENOENT, stat '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Versions/Current/Libraries/Libraries']
    errno: -2,
    code: 'ENOENT',
    path: '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Versions/Current/Libraries/Libraries' } ] undefined

npm ERR! Darwin 12.5.0
npm ERR! argv "/Users/mdyson/.nvm/versions/node/v0.12.0/bin/node" "/Users/mdyson/.nvm/versions/node/v0.12.0/bin/npm" "run" "build"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! example-menubar-app@1.0.0 build: `electron-packager . Example --platform=darwin --arch=x64 --version=0.30.0 --ignore=node_modules/electron --icon=Icon.icns`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the example-menubar-app@1.0.0 build script 'electron-packager . Example --platform=darwin --arch=x64 --version=0.30.0 --ignore=node_modules/electron --icon=Icon.icns'.
npm ERR! This is most likely a problem with the example-menubar-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     electron-packager . Example --platform=darwin --arch=x64 --version=0.30.0 --ignore=node_modules/electron --icon=Icon.icns
npm ERR! You can get their info via:
npm ERR!     npm owner ls example-menubar-app
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/mdyson/projects/skynet/example/npm-debug.log

So, I guess what I should be saying is that this fails on my system:

[Sun 13:34:01] example $ pwd
/Users/mdyson/projects/skynet/example
$ electron-packager . Example --platform=darwin --arch=x64 --version=0.30.0 --ignore=node_modules/electron --icon=Icon.icns

Here is the content of /Users/mdyson/projects/skynet/example/npm-debug.log:

0 info it worked if it ends with ok
1 verbose cli [ '/Users/mdyson/.nvm/versions/node/v0.12.0/bin/node',
1 verbose cli   '/Users/mdyson/.nvm/versions/node/v0.12.0/bin/npm',
1 verbose cli   'run',
1 verbose cli   'build' ]
2 info using npm@2.5.1
3 info using node@v0.12.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info prebuild example-menubar-app@1.0.0
6 info build example-menubar-app@1.0.0
7 verbose unsafe-perm in lifecycle true
8 info example-menubar-app@1.0.0 Failed to exec build script
9 verbose stack Error: example-menubar-app@1.0.0 build: `electron-packager . Example --platform=darwin --arch=x64 --version=0.30.0 --ignore=node_modules/electron --icon=Icon.icns`
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (/Users/mdyson/.nvm/versions/node/v0.12.0/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
9 verbose stack     at EventEmitter.emit (events.js:110:17)
9 verbose stack     at ChildProcess.<anonymous> (/Users/mdyson/.nvm/versions/node/v0.12.0/lib/node_modules/npm/lib/utils/spawn.js:14:12)
9 verbose stack     at ChildProcess.emit (events.js:110:17)
9 verbose stack     at maybeClose (child_process.js:1008:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1080:5)
10 verbose pkgid example-menubar-app@1.0.0
11 verbose cwd /Users/mdyson/projects/skynet/example
12 error Darwin 12.5.0
13 error argv "/Users/mdyson/.nvm/versions/node/v0.12.0/bin/node" "/Users/mdyson/.nvm/versions/node/v0.12.0/bin/npm" "run" "build"
14 error node v0.12.0
15 error npm  v2.5.1
16 error code ELIFECYCLE
17 error example-menubar-app@1.0.0 build: `electron-packager . Example --platform=darwin --arch=x64 --version=0.30.0 --ignore=node_modules/electron --icon=Icon.icns`
17 error Exit status 1
18 error Failed at the example-menubar-app@1.0.0 build script 'electron-packager . Example --platform=darwin --arch=x64 --version=0.30.0 --ignore=node_modules/electron --icon=Icon.icns'.
18 error This is most likely a problem with the example-menubar-app package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     electron-packager . Example --platform=darwin --arch=x64 --version=0.30.0 --ignore=node_modules/electron --icon=Icon.icns
18 error You can get their info via:
18 error     npm owner ls example-menubar-app
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

@jenslind
Copy link
Collaborator

jenslind commented Aug 2, 2015

Yeah would be nice if the build command gets updated, thanks for pointing that out.

Not sure why your build command fails. Wild guess: maybe some broken symlinks somewhere?
What happens if you try to build with the latest electron version, 0.30.2?
You could also try to update to latest electron-packager v5.0.1.

@tomprogers
Copy link
Author

I tried with electron 0.30.2; no good:

# edit /Users/mdyson/projects/skynet/example/package.json with: "electron-prebuilt": "0.30.2"
[Sun 14:31:08] example $ npm i
npm WARN package.json example-menubar-app@1.0.0 No repository field.
-
> electron-prebuilt@0.30.2 postinstall /Users/mdyson/projects/skynet/example/node_modules/electron-prebuilt
> node install.js

electron-prebuilt@0.30.2 node_modules/electron-prebuilt
├── extract-zip@1.0.3 (debug@0.7.4, minimist@0.1.0, async@0.9.0, yauzl@2.3.1, mkdirp@0.5.0, through2@0.6.3, concat-stream@1.5.0)
└── electron-download@1.0.7 (path-exists@1.0.0, home-path@0.1.2, debug@2.2.0, mkdirp@0.5.1, mv@2.1.1, nugget@1.5.4)
[Sun 14:32:28] example $ npm run build

> example-menubar-app@1.0.0 build /Users/mdyson/projects/skynet/example
> electron-packager . Example --platform=darwin --arch=x64 --version=0.30.2 --ignore=node_modules/electron --icon=Icon.icns

Packaging app for platform darwin x64 using electron v0.30.2
[ { [Error: ENOENT, stat '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Frameworks']
    errno: -2,
    code: 'ENOENT',
    path: '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Frameworks' },
  { [Error: ENOENT, stat '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Libraries/Libraries']
    errno: -2,
    code: 'ENOENT',
    path: '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Libraries/Libraries' },
  { [Error: ENOENT, stat '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/Libraries']
    errno: -2,
    code: 'ENOENT',
    path: '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/Libraries' },
  { [Error: ENOENT, stat '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Versions/Current/Libraries/Libraries']
    errno: -2,
    code: 'ENOENT',
    path: '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Versions/Current/Libraries/Libraries' } ] undefined

npm ERR! Darwin 12.5.0
npm ERR! argv "/Users/mdyson/.nvm/versions/node/v0.12.0/bin/node" "/Users/mdyson/.nvm/versions/node/v0.12.0/bin/npm" "run" "build"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! example-menubar-app@1.0.0 build: `electron-packager . Example --platform=darwin --arch=x64 --version=0.30.2 --ignore=node_modules/electron --icon=Icon.icns`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the example-menubar-app@1.0.0 build script 'electron-packager . Example --platform=darwin --arch=x64 --version=0.30.2 --ignore=node_modules/electron --icon=Icon.icns'.
npm ERR! This is most likely a problem with the example-menubar-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     electron-packager . Example --platform=darwin --arch=x64 --version=0.30.2 --ignore=node_modules/electron --icon=Icon.icns
npm ERR! You can get their info via:
npm ERR!     npm owner ls example-menubar-app
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/mdyson/projects/skynet/example/npm-debug.log

And the log:

0 info it worked if it ends with ok
1 verbose cli [ '/Users/mdyson/.nvm/versions/node/v0.12.0/bin/node',
1 verbose cli   '/Users/mdyson/.nvm/versions/node/v0.12.0/bin/npm',
1 verbose cli   'run',
1 verbose cli   'build' ]
2 info using npm@2.5.1
3 info using node@v0.12.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info prebuild example-menubar-app@1.0.0
6 info build example-menubar-app@1.0.0
7 verbose unsafe-perm in lifecycle true
8 info example-menubar-app@1.0.0 Failed to exec build script
9 verbose stack Error: example-menubar-app@1.0.0 build: `electron-packager . Example --platform=darwin --arch=x64 --version=0.30.2 --ignore=node_modules/electron --icon=Icon.icns`
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (/Users/mdyson/.nvm/versions/node/v0.12.0/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
9 verbose stack     at EventEmitter.emit (events.js:110:17)
9 verbose stack     at ChildProcess.<anonymous> (/Users/mdyson/.nvm/versions/node/v0.12.0/lib/node_modules/npm/lib/utils/spawn.js:14:12)
9 verbose stack     at ChildProcess.emit (events.js:110:17)
9 verbose stack     at maybeClose (child_process.js:1008:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1080:5)
10 verbose pkgid example-menubar-app@1.0.0
11 verbose cwd /Users/mdyson/projects/skynet/example
12 error Darwin 12.5.0
13 error argv "/Users/mdyson/.nvm/versions/node/v0.12.0/bin/node" "/Users/mdyson/.nvm/versions/node/v0.12.0/bin/npm" "run" "build"
14 error node v0.12.0
15 error npm  v2.5.1
16 error code ELIFECYCLE
17 error example-menubar-app@1.0.0 build: `electron-packager . Example --platform=darwin --arch=x64 --version=0.30.2 --ignore=node_modules/electron --icon=Icon.icns`
17 error Exit status 1
18 error Failed at the example-menubar-app@1.0.0 build script 'electron-packager . Example --platform=darwin --arch=x64 --version=0.30.2 --ignore=node_modules/electron --icon=Icon.icns'.
18 error This is most likely a problem with the example-menubar-app package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     electron-packager . Example --platform=darwin --arch=x64 --version=0.30.2 --ignore=node_modules/electron --icon=Icon.icns
18 error You can get their info via:
18 error     npm owner ls example-menubar-app
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

This looks like the same failure I was getting with electron 0.30.0.

@tomprogers
Copy link
Author

I tried with both electron-packager v5.0.1 and electron 0.30.2 combined, and get the same error:

# edit /Users/mdyson/projects/skynet/example/package.json with: "electron-packager": "^5.0.1",
[Sun 14:36:47] example $ npm i
npm WARN package.json example-menubar-app@1.0.0 No repository field.
npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.0","npm":"2.5.1"})
electron-packager@5.0.1 node_modules/electron-packager
├── mv@2.1.1
├── rcedit@0.3.0
├── minimist@1.1.2
├── ncp@2.0.0
├── mkdirp@0.5.1 (minimist@0.0.8)
├── run-series@1.1.2 (dezalgo@1.0.3)
├── asar@0.6.1 (chromium-pickle-js@0.1.0, commander@2.3.0, glob@5.0.14, cuint@0.1.5, minimatch@2.0.4)
├── rimraf@2.4.2 (glob@5.0.14)
├── extract-zip@1.0.3 (debug@0.7.4, minimist@0.1.0, async@0.9.0, mkdirp@0.5.0, yauzl@2.3.1, through2@0.6.3, concat-stream@1.5.0)
├── electron-download@1.0.7 (path-exists@1.0.0, home-path@0.1.2, debug@2.2.0, nugget@1.5.4)
└── plist@1.1.0 (util-deprecate@1.0.0, base64-js@0.0.6, xmldom@0.1.19, xmlbuilder@2.2.1)
[Sun 14:39:12] example $ npm run build

> example-menubar-app@1.0.0 build /Users/mdyson/projects/skynet/example
> electron-packager . Example --platform=darwin --arch=x64 --version=0.30.2 --ignore=node_modules/electron --icon=Icon.icns

Packaging app for platform darwin x64 using electron v0.30.2
[ { [Error: ENOENT, stat '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Frameworks']
    errno: -2,
    code: 'ENOENT',
    path: '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Frameworks' },
  { [Error: ENOENT, stat '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Libraries/Libraries']
    errno: -2,
    code: 'ENOENT',
    path: '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Libraries/Libraries' },
  { [Error: ENOENT, stat '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Versions/Current/Libraries/Libraries']
    errno: -2,
    code: 'ENOENT',
    path: '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Versions/Current/Libraries/Libraries' },
  { [Error: ENOENT, stat '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/Libraries']
    errno: -2,
    code: 'ENOENT',
    path: '/Users/mdyson/projects/skynet/example/Example.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/Libraries' } ] undefined

npm ERR! Darwin 12.5.0
npm ERR! argv "/Users/mdyson/.nvm/versions/node/v0.12.0/bin/node" "/Users/mdyson/.nvm/versions/node/v0.12.0/bin/npm" "run" "build"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! example-menubar-app@1.0.0 build: `electron-packager . Example --platform=darwin --arch=x64 --version=0.30.2 --ignore=node_modules/electron --icon=Icon.icns`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the example-menubar-app@1.0.0 build script 'electron-packager . Example --platform=darwin --arch=x64 --version=0.30.2 --ignore=node_modules/electron --icon=Icon.icns'.
npm ERR! This is most likely a problem with the example-menubar-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     electron-packager . Example --platform=darwin --arch=x64 --version=0.30.2 --ignore=node_modules/electron --icon=Icon.icns
npm ERR! You can get their info via:
npm ERR!     npm owner ls example-menubar-app
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/mdyson/projects/skynet/example/npm-debug.log

And the log:

0 info it worked if it ends with ok
1 verbose cli [ '/Users/mdyson/.nvm/versions/node/v0.12.0/bin/node',
1 verbose cli   '/Users/mdyson/.nvm/versions/node/v0.12.0/bin/npm',
1 verbose cli   'run',
1 verbose cli   'build' ]
2 info using npm@2.5.1
3 info using node@v0.12.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info prebuild example-menubar-app@1.0.0
6 info build example-menubar-app@1.0.0
7 verbose unsafe-perm in lifecycle true
8 info example-menubar-app@1.0.0 Failed to exec build script
9 verbose stack Error: example-menubar-app@1.0.0 build: `electron-packager . Example --platform=darwin --arch=x64 --version=0.30.2 --ignore=node_modules/electron --icon=Icon.icns`
9 verbose stack Exit status 1
9 verbose stack     at EventEmitter.<anonymous> (/Users/mdyson/.nvm/versions/node/v0.12.0/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
9 verbose stack     at EventEmitter.emit (events.js:110:17)
9 verbose stack     at ChildProcess.<anonymous> (/Users/mdyson/.nvm/versions/node/v0.12.0/lib/node_modules/npm/lib/utils/spawn.js:14:12)
9 verbose stack     at ChildProcess.emit (events.js:110:17)
9 verbose stack     at maybeClose (child_process.js:1008:16)
9 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1080:5)
10 verbose pkgid example-menubar-app@1.0.0
11 verbose cwd /Users/mdyson/projects/skynet/example
12 error Darwin 12.5.0
13 error argv "/Users/mdyson/.nvm/versions/node/v0.12.0/bin/node" "/Users/mdyson/.nvm/versions/node/v0.12.0/bin/npm" "run" "build"
14 error node v0.12.0
15 error npm  v2.5.1
16 error code ELIFECYCLE
17 error example-menubar-app@1.0.0 build: `electron-packager . Example --platform=darwin --arch=x64 --version=0.30.2 --ignore=node_modules/electron --icon=Icon.icns`
17 error Exit status 1
18 error Failed at the example-menubar-app@1.0.0 build script 'electron-packager . Example --platform=darwin --arch=x64 --version=0.30.2 --ignore=node_modules/electron --icon=Icon.icns'.
18 error This is most likely a problem with the example-menubar-app package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error     electron-packager . Example --platform=darwin --arch=x64 --version=0.30.2 --ignore=node_modules/electron --icon=Icon.icns
18 error You can get their info via:
18 error     npm owner ls example-menubar-app
18 error There is likely additional logging output above.
19 verbose exit [ 1, true ]

@tomprogers
Copy link
Author

In case it helps, I'm running OSX 10.8.5.

I checked, and neither electron nor electron-prebuilt list any incompatibilities with my OS. Perhaps I missed something.

@tomprogers
Copy link
Author

I created a new project using yo electron (using yo generator-electron, which also depends on electron-prebuilt@0.30.2), and the base app also fails to start. Check out my stderr:

[Mon 21:04:07] skynet-yo $ npm list --depth=0
skynet-yo@0.0.0 /Users/mdyson/projects/skynet-yo
├── electron-debug@0.1.1
├── electron-packager@5.0.1
└── electron-prebuilt@0.30.2

[Mon 21:04:07] skynet-yo $ npm start

> skynet-yo@0.0.0 start /Users/mdyson/projects/skynet-yo
> electron .

[0803/210409:ERROR:file_io.cc(30)] read: expected 40, observed 0
[0803/210409:ERROR:http_transport_mac.mm(186)] Could not connect to the server. (NSURLErrorDomain -1004)

I think this may be an issue with electron-prebuilt, or electron proper. I've filed a ticket on the electron-prebuilt project, citing this one. If anyone has learned anything useful while investigating this, please post it there.

Thanks for your help, folks. 8)

@jenslind
Copy link
Collaborator

Gonna close this for now as this is not a menubar issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants