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

Electron runtime detection #188

Closed
es128 opened this issue Nov 13, 2015 · 6 comments
Closed

Electron runtime detection #188

es128 opened this issue Nov 13, 2015 · 6 comments

Comments

@es128
Copy link
Contributor

es128 commented Nov 13, 2015

From: fsevents/fsevents#93 (comment) (//cc @stdavis)

node-pre-gyp ERR! install error 
node-pre-gyp ERR! stack Error: Unsupported target version: 0.34.0
node-pre-gyp ERR! stack     at get_runtime_abi (/Users/stdavis/Documents/Projects/atom-amdbutler/node_modules/chokidar/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/versioning.js:156:23)
node-pre-gyp ERR! stack     at Object.module.exports.evaluate (/Users/stdavis/Documents/Projects/atom-amdbutler/node_modules/chokidar/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/versioning.js:265:19)
node-pre-gyp ERR! stack     at install (/Users/stdavis/Documents/Projects/atom-amdbutler/node_modules/chokidar/node_modules/fsevents/node_modules/node-pre-gyp/lib/install.js:138:31)
node-pre-gyp ERR! stack     at Object.self.commands.(anonymous function) [as install] (/Users/stdavis/Documents/Projects/atom-amdbutler/node_modules/chokidar/node_modules/fsevents/node_modules/node-pre-gyp/lib/node-pre-gyp.js:48:37)
node-pre-gyp ERR! stack     at run (/Users/stdavis/Documents/Projects/atom-amdbutler/node_modules/chokidar/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp:79:30)
node-pre-gyp ERR! stack     at Object.<anonymous> (/Users/stdavis/Documents/Projects/atom-amdbutler/node_modules/chokidar/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp:131:1)
node-pre-gyp ERR! stack     at Module._compile (module.js:456:26)
node-pre-gyp ERR! stack     at Object.Module._extensions..js (module.js:474:10)
node-pre-gyp ERR! stack     at Module.load (module.js:356:32)
node-pre-gyp ERR! stack     at Function.Module._load (module.js:312:12)
node-pre-gyp ERR! System Darwin 15.0.0
node-pre-gyp ERR! command "node" "/Users/stdavis/Documents/Projects/atom-amdbutler/node_modules/chokidar/node_modules/fsevents/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/stdavis/Documents/Projects/atom-amdbutler/node_modules/chokidar/node_modules/fsevents
node-pre-gyp ERR! node -v v0.10.40
node-pre-gyp ERR! node-pre-gyp -v v0.6.15
node-pre-gyp ERR! not ok 

npm ERR! Darwin 15.0.0
npm ERR! argv "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/Users/stdavis/.atom/.apm/.apmrc" "--userconfig" "/Users/stdavis/.atom/.apmrc" "rebuild" "--target=0.34.0" "--arch=x64"
npm ERR! node v0.10.40
npm ERR! npm  v2.13.3
npm ERR! code ELIFECYCLE
npm ERR! fsevents@1.0.5 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the fsevents@1.0.5 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! This is most likely a problem with the fsevents package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR!     npm owner ls fsevents
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/stdavis/Documents/Projects/atom-amdbutler/npm-debug.log

node-pre-gyp does not appear to try to auto-detect electron:

var runtime = options.runtime || (process.versions['node-webkit'] ? 'node-webkit' : 'node');

When the install command is baked in to a package, how would an end-user be able apply the equivalent of --runtime=electron in order to prevent their npm install from barfing?

@es128
Copy link
Contributor Author

es128 commented Nov 13, 2015

Appears there are two PRs open to address this: #177 & #187

@stdavis
Copy link

stdavis commented Nov 13, 2015

Thanks, @es128!

@stdavis
Copy link

stdavis commented Nov 24, 2015

Any updates on this issue? I can see that the two PR's are still open. Anything that I can do to help get one of them accepted?

@hedefalk
Copy link

Hi! I'm really struggling with using chokidar -> fsevents -> node-pre-gyp in an Atom plugin.

apm rebuild still fails for me. Repro is as simple as downloading Atom and running apm rebuild on fsevents.

I reported here:
atom/apm#531

but maybe here is a better place to ask? Seems the open issues just lie around…

@springmeyer
Copy link
Contributor

We've fix that is now in the released v0.6.26 (#187)

@hedefalk
Copy link

@springmeyer I guess you mean 0.6.25?

I got hopeful here when I saw this released and the following release of fsevents using this (thanks @es128 ). But fsevents still fails with node-pre-gyp with 0.6.25 using apm rebuild:

~/d/p/fs-events-apm-rebuild ❯❯❯ rm -rf node_modules
~/d/p/fs-events-apm-rebuild ❯❯❯ npm install

> fsevents@1.0.11 install /Users/viktor/dev/projects/fs-events-apm-rebuild/node_modules/fsevents
> node-pre-gyp install --fallback-to-build

[fsevents] Success: "/Users/viktor/dev/projects/fs-events-apm-rebuild/node_modules/fsevents/lib/binding/Release/node-v46-darwin-x64/fse.node" is installed via remote
fs-events-apm-rebuild@0.0.0 /Users/viktor/dev/projects/fs-events-apm-rebuild
└─┬ fsevents@1.0.11
  ├── nan@2.2.1
  └─┬ node-pre-gyp@0.6.25
  …


~/d/p/fs-events-apm-rebuild ❯❯❯ apm rebuild
Rebuilding modules ✗
node-pre-gyp ERR! install error
node-pre-gyp ERR! stack Error: Unsupported target version: 0.34.5
node-pre-gyp ERR! stack     at get_runtime_abi (/Users/viktor/dev/projects/fs-events-apm-rebuild/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/versioning.js:156:23)
node-pre-gyp ERR! stack     at Object.module.exports.evaluate (/Users/viktor/dev/projects/fs-events-apm-rebuild/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/versioning.js:277:19)
node-pre-gyp ERR! stack     at install (/Users/viktor/dev/projects/fs-events-apm-rebuild/node_modules/fsevents/node_modules/node-pre-gyp/lib/install.js:138:31)
node-pre-gyp ERR! stack     at Object.self.commands.(anonymous function) [as install] (/Users/viktor/dev/projects/fs-events-apm-rebuild/node_modules/fsevents/node_modules/node-pre-gyp/lib/node-pre-gyp.js:48:37)
node-pre-gyp ERR! stack     at run (/Users/viktor/dev/projects/fs-events-apm-rebuild/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp:79:30)
node-pre-gyp ERR! stack     at Object.<anonymous> (/Users/viktor/dev/projects/fs-events-apm-rebuild/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp:131:1)
node-pre-gyp ERR! stack     at Module._compile (module.js:456:26)
node-pre-gyp ERR! stack     at Object.Module._extensions..js (module.js:474:10)
node-pre-gyp ERR! stack     at Module.load (module.js:356:32)
node-pre-gyp ERR! stack     at Function.Module._load (module.js:312:12)
node-pre-gyp ERR! System Darwin 15.3.0
node-pre-gyp ERR! command "node" "/Users/viktor/dev/projects/fs-events-apm-rebuild/node_modules/fsevents/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/viktor/dev/projects/fs-events-apm-rebuild/node_modules/fsevents
node-pre-gyp ERR! node -v v0.10.40
node-pre-gyp ERR! node-pre-gyp -v v0.6.25
node-pre-gyp ERR! not ok

npm ERR! Darwin 15.3.0
npm ERR! argv "/Applications/Atom.app/Contents/Resources/app/apm/bin/node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/Users/viktor/.atom/.apm/.apmrc" "--userconfig" "/Users/viktor/.atom/.apmrc" "rebuild" "--target=0.34.5" "--arch=x64"
npm ERR! node v0.10.40
npm ERR! npm  v2.13.3
npm ERR! code ELIFECYCLE
npm ERR! fsevents@1.0.11 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fsevents@1.0.11 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! This is most likely a problem with the fsevents package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR!     npm owner ls fsevents
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/viktor/dev/projects/fs-events-apm-rebuild/npm-debug.log

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

4 participants