profile
viewpoint

Ask questionsnode-pre-gyp build fail error while installing with `npm install` or `npm install -d`

<!-- Thank you for reporting an issue. The more information you can give us, the better the chance we can fix your problem.

This issue tracker is for issues with node-gyp, if you have an issue installing a specific module, please file an issue on that module's issue tracker (npm issues modulename). -->

  • Node Version: <!-- node -v and npm -v --> 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<!-- uname -a (UNIX), or systeminfo | findstr /B /C:"OS Name" /C:"OS Version" /C:"System Type" (Windows) -->
  • 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<!-- cc -v (UNIX) or msbuild /version & cl (Windows) -->
  • Module: npm install -d<!-- what you tried to build/install -->

<details><summary>Verbose output (from npm or node-gyp):</summary>

<!-- Paste your log between the backticks. Contents of npm-debug.log or verbose build output -->

  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

</details>

<!-- Any further details --> 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

nodejs/node-gyp

Answer questions top-talent0112

It didn't still work. any other solution?

useful!

Related questions

Error: `gyp` failed with exit code: 1 at ChildProcess.onCpExit hot 4
gyp ERR! stack Error: `make` failed with exit code: 2 hot 2
npm install error on windows 10 hot 2
Fails on every npm install on macOS Mojave hot 2
node-gyp: EPERM: operation not permitted, read hot 2
Visual Studio finder is doing a case-sensitive path check hot 2
node-gyp rebuild failed hot 1
Node gyp build fails on node v12.1.0 hot 1
Is this an Issue with MACOS catalina? hot 1
gyp ERR! stack Error: `make` failed with exit code: 2 hot 1
Is this an Issue with MACOS catalina? hot 1
Is this an Issue with MACOS catalina? hot 1
Not able to build in osx 10.14.2 with java 10.0.1 hot 1
TypeError: '>=' not supported between instances of 'tuple' and 'str' hot 1
Breaks with VS2019 installed hot 1
source:https://uonfu.com/
Github User Rank List