atom / atom-keymap

Atom's selector-based keymap system
MIT License
105 stars 58 forks source link

nan error while trying to install #118

Open joshaber opened 8 years ago

joshaber commented 8 years ago

I currently can't install this package, or any package with a pathwatcher dependency.

@atom/core I've been banging by head against this for a couple days. Any ideas? @kuychaco and @BinaryMuse are also hitting this.

$ rm -rf node_modules/ && apm install
Installing modules ✗
> runas@3.1.1 install /Users/joshaber/Documents/Development/GitHub/atom-keymap/node_modules/pathwatcher/node_modules/runas
> node-gyp rebuild

  CXX(target) Release/obj.target/runas/src/main.o

> keyboard-layout@1.0.0 install /Users/joshaber/Documents/Development/GitHub/atom-keymap/node_modules/keyboard-layout
> node-gyp rebuild

  CXX(target) Release/obj.target/keyboard-layout-observer/src/keyboard-layout-observer-mac.o
  SOLINK_MODULE(target) Release/keyboard-layout-observer.node

> coffeelint@0.5.7 install /Users/joshaber/Documents/Development/GitHub/atom-keymap/node_modules/grunt-coffeelint/node_modules/coffeelint
> [ -e lib/commandline.js ] || npm run compile

npm WARN deprecated lodash@0.9.2: Grunt needs your help! See https://github.com/gruntjs/grunt/issues/1403.
npm WARN deprecated graceful-fs@1.2.3: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
2016-03-21 11:11:14.401 xcodebuild[90063:11173078] [MT] PluginLoading: Required plug-in compatibility UUID F41BD31E-2683-44B8-AE7F-5F09E919790E for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/CommandBar.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-03-21 11:11:14.402 xcodebuild[90063:11173078] [MT] PluginLoading: Required plug-in compatibility UUID F41BD31E-2683-44B8-AE7F-5F09E919790E for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin' not present in DVTPlugInCompatibilityUUIDs
In file included from ../src/main.cc:1:
../../nan/nan.h:150:10: fatal error: 'nan_callbacks.h' file not found
#include "nan_callbacks.h"  // NOLINT(build/include)
         ^
1 error generated.
make: *** [Release/obj.target/runas/src/main.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Darwin 15.3.0
gyp ERR! command "node" "/Applications/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/joshaber/Documents/Development/GitHub/atom-keymap/node_modules/pathwatcher/node_modules/runas
gyp ERR! node -v v0.10.40
gyp ERR! node-gyp -v v2.0.2
gyp ERR! not ok 
npm WARN deprecated graceful-fs@1.1.14: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
npm WARN prefer global coffee-script@1.10.0 should be installed with -g
2016-03-21 11:11:16.551 xcodebuild[90099:11173186] [MT] PluginLoading: Required plug-in compatibility UUID F41BD31E-2683-44B8-AE7F-5F09E919790E for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/CommandBar.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-03-21 11:11:16.554 xcodebuild[90099:11173186] [MT] PluginLoading: Required plug-in compatibility UUID F41BD31E-2683-44B8-AE7F-5F09E919790E for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin' not present in DVTPlugInCompatibilityUUIDs
npm WARN prefer global grunt-cli@0.1.13 should be installed with -g
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/joshaber/.atom/.apm/.apmrc" "--userconfig" "/Users/joshaber/.atom/.apmrc" "install" "--target=0.36.8" "--arch=x64"
npm ERR! node v0.10.40
npm ERR! npm  v2.13.3
npm ERR! code ELIFECYCLE

npm ERR! runas@3.1.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the runas@3.1.1 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the runas package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls runas
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/joshaber/Documents/Development/GitHub/atom-keymap/npm-debug.log
johnhaley81 commented 8 years ago

We just tried to update to electron 0.37.8 and we're see some issues with runas not being able to be compiled as well. This is the error that we're getting.

I am curious though, why does atom-keymap need node-pathwatcher? It's only watching a single file and fs.watch can handle that pretty well with no additional compiler requirements. It's not the administrator rights since runas is only needed when writing a file which is never called here. Is there something gained with node-pathwatcher that I'm missing? Should it be removed in atom-keymap?

If node-pathwatcher is removed then this module becomes JavaScript only and doesn't need to have a C++ compiler dependency.

johnhaley81 commented 8 years ago

Ah, with the above gist the issues was having a target=^0.37.8 instead of target=0.37.8 in the .npmrc.

However the point still stands that this requirement might be more that what's actually needed for this package.

as-cii commented 8 years ago

@joshaber: did you manage to fix this locally?

Running npm install twice seems to work for me, although I haven't been able to track down why this is happening. Interestingly this also works smoothly on CI, although the fact that we use Linux on those machines might have an impact on this strange behaviour (which, by the way, could highlight a problem with the installation order of dependencies and it's likely related to the runas package).

joshaber commented 8 years ago

No 😞 IIRC in talking with @nathansobo the consensus seemed to be that it's related to apm using an old version of npm.

mdaymond commented 7 years ago

@joshaber - This is strange and I expect unrelated, but I am getting the following error with you name in the stacktrace:

My setup is:

2017-02-09 20:00:17.874 code[8756:241228] *** Assertion failure in +[SQRLDirectoryManager currentApplicationManager], /Users/joshaber/Documents/Development/GitHub/Squirrel.Mac/Squirrel/SQRLDirectoryManager.m:30
joshaber commented 7 years ago

@mdaymond Ha, it's because the builds for the auto updater framework (Squirrel.Mac) are done locally, usually by me. That looks like an issue specific to VSCode. I'd recommend contacting them for support.