Comments (8)
Hello!
Looks like you are running electron 0.26.0
. getAppPath
was implemented first in 0.30.0
. :)
from menubar.
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
> [email protected] 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! [email protected] 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 [email protected] 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 [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info prebuild [email protected]
6 info build [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec build script
9 verbose stack Error: [email protected] 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 [email protected]
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 [email protected] 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 [email protected] 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 ]
from menubar.
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
.
from menubar.
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 [email protected] No repository field.
-
> [email protected] postinstall /Users/mdyson/projects/skynet/example/node_modules/electron-prebuilt
> node install.js
[email protected] node_modules/electron-prebuilt
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
[Sun 14:32:28] example $ npm run build
> [email protected] 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! [email protected] 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 [email protected] 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 [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info prebuild [email protected]
6 info build [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec build script
9 verbose stack Error: [email protected] 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 [email protected]
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 [email protected] 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 [email protected] 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.
from menubar.
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 [email protected] No repository field.
npm WARN engine [email protected]: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.0","npm":"2.5.1"})
[email protected] node_modules/electron-packager
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected])
[Sun 14:39:12] example $ npm run build
> [email protected] 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! [email protected] 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 [email protected] 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 [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info prebuild [email protected]
6 info build [email protected]
7 verbose unsafe-perm in lifecycle true
8 info [email protected] Failed to exec build script
9 verbose stack Error: [email protected] 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 [email protected]
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 [email protected] 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 [email protected] 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 ]
from menubar.
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.
from menubar.
I created a new project using yo electron
(using yo generator-electron, which also depends on [email protected]), and the base app also fails to start. Check out my stderr:
[Mon 21:04:07] skynet-yo $ npm list --depth=0
[email protected] /Users/mdyson/projects/skynet-yo
├── [email protected]
├── [email protected]
└── [email protected]
[Mon 21:04:07] skynet-yo $ npm start
> [email protected] 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)
from menubar.
Gonna close this for now as this is not a menubar issue.
from menubar.
Related Issues (20)
- Cannot integrate node in the menubar BrowserWindow HOT 2
- Remote url is getting cached
- Hide from cmd + tab menu HOT 1
- Taskbar with auto-hide on gets overlaid by menubar
- Add support to work with Electron 21 HOT 2
- Question: Site Context Menus HOT 1
- Menubar showing empty white screen with no content, but shows content on the desktop app and the website. HOT 1
- hello-world project cannot run on M1 mac
- Electron Forge x React with Menubar HOT 1
- Incorrect position on multiple monitor HOT 1
- Menubar window is incorrectly positioned when opened while the tray icon is hidden on Windows HOT 1
- Electron menubar not loading file in Production - but working properly in development HOT 4
- Doesn't work in the latest version of electron (v.26) HOT 1
- Cant find window.require with reactjs HOT 1
- Setting an icon makes the app disappear
- The IconTemplate.png overrides my icons when I package my app HOT 2
- Small bug on macos menubar
- add electron 28.x and 29.x support
- Main window's menu disappear when have menubar window HOT 1
- bug(macOS): inconsistent space when using mission control spaces HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from menubar.