简体   繁体   中英

npm install fails with node-gyp build error

Today when I run npm install , it fails and gives me the following error log. I know it's an issue with hashtable but I have never had this issue before.

> hashtable@2.0.2 install /Users/admin/myproject/node_modules/hashtable
> node-gyp configure build

  CXX(target) Release/obj.target/native/src/hashtable.o
  SOLINK_MODULE(target) Release/native.node
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/native.node] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/admin/.npm-packages/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:87:13)
gyp ERR! stack     at ChildProcess.emit (events.js:172:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Darwin 15.5.0
gyp ERR! command "/usr/local/bin/node" "/Users/admin/.npm-packages/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build"
gyp ERR! cwd /Users/admin/myproject/node_modules/hashtable
gyp ERR! node -v v4.4.7
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
myproject@0.0.1 /Users/admin/myproject
└── (empty)

npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/Users/admin/.npm-packages/bin/npm" "install"
npm ERR! node v4.4.7
npm ERR! npm  v3.10.5
npm ERR! code ELIFECYCLE

npm ERR! hashtable@2.0.2 install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the hashtable@2.0.2 install script 'node-gyp configure build'.
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 hashtable package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp configure build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs hashtable
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls hashtable
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/admin/myproject/npm-debug.log
npm ERR! code 1

I thought there might be a problem with node-gyp so I did a npm install node-gyp -g separately but the issue did not go away. Does anyone know how to resolve this?

By the way, I am on Mac,running OSX 10.11.5, also recently installed XCode 6.3.2 for a separate project and can only use this version of XCode, not sure if that is causing the problem.

node-gyp also requires python and xcode on MacOs for C++ compilation. There are similar requirements for other systems.

You can find the pre-reqs for the node-gyp package on its npm page here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM