arboleya / electrify

Package your Meteor apps with Electron, and butter
MIT License
247 stars 52 forks source link

This doesn't work #7

Closed ghost closed 9 years ago

ghost commented 9 years ago

I ran the command on my app and i just get an error as it is trying to reference a non-existent folder on OS X

Error: Cannot find module '~/Dash-Control-Cards/.electrify/node_modules/electron-prebuilt/package.json' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Npm.require (~/Dash-Control-Cards/.meteor/local/build/programs/server/boot.js:142:18) at package_app (packages/arboleya:electrify/index.meteor.js:317:1) at release (packages/arboleya:electrify/index.meteor.js:167:1) at repl:1:2 at ~/Dash-Control-Cards/.meteor/local/build/programs/server/shell-server.js:243:23

ghost commented 9 years ago

As an added information, on OS X I did:

sudo meteor shell
electrify
ghost commented 9 years ago

Some added information from the logs that it appears should assist. I think this could be due to permission problems? All commands for node etc require "sudo node" "sudo meteor" on mac - that is the default way it installed.

17603 verbose stack Error: electron-prebuilt@0.29.2 postinstall: node install.js 17603 verbose stack spawn ENOENT 17603 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:17:16) 17603 verbose stack at ChildProcess.emit (events.js:110:17) 17603 verbose stack at maybeClose (child_process.js:1015:16) 17603 verbose stack at Process.ChildProcess._handle.onexit (child_process.js:1087:5) 17604 verbose pkgid electron-prebuilt@0.29.2 17605 verbose cwd /Applications/Dash-Control-Cards/.electrify 17606 error Darwin 14.1.0 17607 error argv "node" "/usr/local/bin/npm" "install" 17608 error node v0.12.7 17609 error npm v2.11.3 17610 error file sh 17611 error code ELIFECYCLE 17612 error errno ENOENT 17613 error syscall spawn 17614 error electron-prebuilt@0.29.2 postinstall: node install.js 17614 error spawn ENOENT 17615 error Failed at the electron-prebuilt@0.29.2 postinstall script 'node install.js'. 17615 error This is most likely a problem with the electron-prebuilt package, 17615 error not with npm itself. 17615 error Tell the author that this fails on your system: 17615 error node install.js 17615 error You can get their info via: 17615 error npm owner ls electron-prebuilt 17615 error There is likely additional logging output above. 17616 verbose exit [ 1, true ]

ghost commented 9 years ago

Ok I ran "sudo chmod +rx /usr/local/bin" - this got it working. However, the app it created opens for a split second then closes.

arboleya commented 9 years ago

It appears to be a problem with your npm installation - ideally you shouldn't need to use sudo.

However, I'm isolating the npm package from inside meteor, I guess it will fix all cases involving npm's permission issues.

arboleya commented 9 years ago

Hi @bradynapier, now it uses the Meteor's npm package instead of the user's ones.

Please update and let me know if it worked:

meteor remove arboleya:electrify && meteor add arboleya:electrify