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

node-pre-gyp build fail error while installing with `npm install` or `npm install -d` #1599

Closed
swoodivyesh opened this Issue Nov 6, 2018 · 3 comments

Comments

Projects
None yet
4 participants
@swoodivyesh
Copy link

swoodivyesh commented Nov 6, 2018

  • Node Version: 11.0.0
  • NPM Version: 6.4.1
  • Platform: Darwin prabal-ADFGs-MacBook-Pro.local 17.2.0 Darwin Kernel Version 17.2.0: Fri Sep 29 18:27:05 PDT 2017; root:xnu-4570.20.62~3/RELEASE_X86_64 x86_64
  • Compiler: Apple LLVM version 9.1.0 (clang-902.0.39.1)
    Target: x86_64-apple-darwin17.2.0
    Thread model: posix
    InstalledDir: /Library/Developer/CommandLineTools/usr/bin
  • Module: npm install -d
Verbose output (from npm or node-gyp):
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
rm: ./Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o.d.raw: No such file or directory
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 17.2.0
gyp ERR! command "/usr/local/Cellar/node/11.0.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/Users/Divyeshparmar/Documents/speakerswire-admin/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v67-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/Divyeshparmar/Documents/speakerswire-admin/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v67-darwin-x64-unknown" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /Users/Divyeshparmar/Documents/speakerswire-admin/node_modules/google-gax/node_modules/grpc
gyp ERR! node -v v11.0.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/avl/avl.o
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/11.0.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/Users/Divyeshparmar/Documents/speakerswire-admin/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v67-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/Divyeshparmar/Documents/speakerswire-admin/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v67-darwin-x64-unknown --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/Divyeshparmar/Documents/speakerswire-admin/node_modules/google-gax/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:962:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
node-pre-gyp ERR! System Darwin 17.2.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/11.0.0/bin/node" "/Users/Divyeshparmar/Documents/speakerswire-admin/node_modules/google-gax/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /Users/Divyeshparmar/Documents/speakerswire-admin/node_modules/google-gax/node_modules/grpc
node-pre-gyp ERR! node -v v11.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok 
Failed to execute '/usr/local/Cellar/node/11.0.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/Users/Divyeshparmar/Documents/speakerswire-admin/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v67-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/Divyeshparmar/Documents/speakerswire-admin/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v67-darwin-x64-unknown --napi_version=3 --node_abi_napi=napi' (1)
npm info lifecycle grpc@1.16.0~install: Failed to exec install script
npm timing action:install Completed in 9072ms
  CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/backoff/backoff.o
../deps/grpc/src/core/lib/backoff/backoff.cc:19:10: fatal error: 'grpc/support/port_platform.h' file not found
#include <grpc/support/port_platform.h>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.░⸩ ⠴ install: timing action:install Completed in 9072ms
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/backoff/backoff.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 17.2.0
gyp ERR! command "/usr/local/Cellar/node/11.0.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/Users/Divyeshparmar/Documents/speakerswire-admin/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v67-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/Divyeshparmar/Documents/speakerswire-admin/node_modules/google-gax/node_modules/grpc/src/node/extension_binary/node-v67-darwin-x64-unknown" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /Users/Divyeshparmar/Documents/speakerswire-admin/node_modules/google-gax/node_modules/grpc
gyp ERR! node -v v11.0.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm timing stage:rollbackFailedOptional Completed in 471ms
npm timing stage:runTopLevelLifecycles Completed in 30557ms
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.16.0 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the grpc@1.16.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm timing npm Completed in 32016ms

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/Divyeshparmar/.npm/_logs/2018-11-06T06_26_21_408Z-debug.log

the repo has a server running with Express.js+Next.js and it is serving React-redux application. The repo's readme.md says that it needs to be installed by running npm install -d but whenever I run it with it or npm install it just gives out following error

Please help me on how should I resolve it or where to look at for the same. Please help

@richardlau

This comment has been minimized.

Copy link
Member

richardlau commented Nov 6, 2018

See grpc/grpc-node#594.

@swoodivyesh

This comment has been minimized.

Copy link

swoodivyesh commented Nov 6, 2018

Thank you for suggesting that, the error got resolved by running

npm install --build-from-resource

as suggested by (@nicolasnoble)[https://github.com/nicolasnoble]

@bnoordhuis bnoordhuis closed this Nov 9, 2018

@shaileshpendam

This comment has been minimized.

Copy link

shaileshpendam commented Dec 27, 2018

Thank you for suggesting that, the error got resolved by running

npm install --build-from-resource

as suggested by (@nicolasnoble)[https://github.com/nicolasnoble]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment