node-gyp fails
Closed this issue · 1 comments
abbood commented
when running npm-install on my project that's using electron, I get this error:
log@3.0.0 install ~/dev/desktop/HAH-Desktop/node_modules/nslog
> node-gyp rebuild
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
2016-09-05 09:52:38.595 xcodebuild[90303:10627491] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ObjectGraph.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-09-05 09:52:38.597 xcodebuild[90303:10627491] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/BBUDebuggerTuckAway.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-09-05 09:52:38.598 xcodebuild[90303:10627491] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/AdjustFontSize.xcplugin' not present in DVTPlugInCompatibilityUUIDs
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
CXX(target) Release/obj.target/nslog/src/main.o
In file included from ../src/main.cc:1:
../src/nslog.h:4:10: fatal error: 'string' file not found
#include <string>
^
1 error generated.
make: *** [Release/obj.target/nslog/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 (~/.nvm/versions/node/v6.5.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 15.6.0
gyp ERR! command "~/.nvm/versions/node/v6.5.0/bin/node" "~/.nvm/versions/node/v6.5.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd ~/dev/desktop/HAH-Desktop/node_modules/nslog
gyp ERR! node -v v6.5.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
electron-react-boilerplate@0.10.0 ~/dev/desktop/HAH-Desktop
└── UNMET PEER DEPENDENCY immutability-helper@~2.0.0
npm WARN react-toolbox@1.2.0 requires a peer of immutability-helper@~2.0.0 but none was installed.
npm ERR! Darwin 15.6.0
npm ERR! argv "~/.nvm/versions/node/v6.5.0/bin/node" "~/.nvm/versions/node/v6.5.0/bin/npm" "install"
npm ERR! node v6.5.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! nslog@3.0.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nslog@3.0.0 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the nslog 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 information on how to open an issue for this project with:
npm ERR! npm bugs nslog
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls nslog
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! ~/dev/desktop/HAH-Desktop/npm-debug.log
npm ERR! code 1
here is the content of npm-debug.og
npm-debug.log.zip
analysis
when i tried to run this on the CLI:
node-gyp rebuild
i get this:
gyp info it worked if it ends with ok
gyp info using node-gyp@3.4.0
gyp info using node@6.5.0 | darwin | x64
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp info spawn /usr/local/bin/python2
gyp info spawn args [ '/Users/abdullahbakhach/.nvm/versions/node/v6.5.0/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/abdullahbakhach/dev/desktop/HAH-Desktop/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/abdullahbakhach/.nvm/versions/node/v6.5.0/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/abdullahbakhach/.node-gyp/6.5.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/abdullahbakhach/.node-gyp/6.5.0',
gyp info spawn args '-Dnode_gyp_dir=/Users/abdullahbakhach/.nvm/versions/node/v6.5.0/lib/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/abdullahbakhach/dev/desktop/HAH-Desktop',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp: binding.gyp not found (cwd: /Users/abdullahbakhach/dev/desktop/HAH-Desktop) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/Users/abdullahbakhach/.nvm/versions/node/v6.5.0/lib/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 15.6.0
gyp ERR! command "/Users/abdullahbakhach/.nvm/versions/node/v6.5.0/bin/node" "/Users/abdullahbakhach/.nvm/versions/node/v6.5.0/bin/node-gyp" "rebuild"
gyp ERR! cwd /Users/abdullahbakhach/dev/desktop/HAH-Desktop
gyp ERR! node -v v6.5.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
abbood commented
turns out it's b/c of this env manager i installed for swift
https://github.com/kylef/swiftenv
i have since deleted it and now i'm now back in business