rhel_7.2-generic-160915-1_1_2_0
node js v10.16.0.
Expect to install grpc properly
05:45:55@0-9:(~/ram/grpc/examples/node/dynamic_codegen)$npm install
[email protected] install /root/ram/grpc/examples/node/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/root/ram/grpc/examples/node/node_modules/grpc/src/node'
gyp WARN EACCES current user does not have permission to access the dev dir "/root/.cache/node-gyp/10.16.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/root/ram/grpc/examples/node/node_modules/grpc/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/root/ram/grpc/examples/node/node_modules/grpc/.node-gyp'
gyp ERR! System Linux 3.10.0-327.el7.x86_64
gyp ERR! command "/usr/local/lib/nodejs/node-v10.16.0-linux-x64/bin/node" "/usr/local/lib/nodejs/node-v10.16.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=/root/ram/grpc/examples/node/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/root/ram/grpc/examples/node/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64"
gyp ERR! cwd /root/ram/grpc/examples/node/node_modules/grpc
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/lib/nodejs/node-v10.16.0-linux-x64/bin/node /usr/local/lib/nodejs/node-v10.16.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/root/ram/grpc/examples/node/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/root/ram/grpc/examples/node/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
node-pre-gyp ERR! stack at ChildProcess.
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:198:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:982:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Linux 3.10.0-327.el7.x86_64
node-pre-gyp ERR! command "/usr/local/lib/nodejs/node-v10.16.0-linux-x64/bin/node" "/root/ram/grpc/examples/node/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /root/ram/grpc/examples/node/node_modules/grpc
node-pre-gyp ERR! node -v v10.16.0
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/lib/nodejs/node-v10.16.0-linux-x64/bin/node /usr/local/lib/nodejs/node-v10.16.0-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/root/ram/grpc/examples/node/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/root/ram/grpc/examples/node/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-01-21T05_46_43_918Z-debug.log
Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).
See TROUBLESHOOTING.md for how to diagnose problems better.
following link solved this issue. Closing it.
https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally#reinstall-npm-with-a-node-version-manager
I found that the problem was that the package request
was missing.
Installing it before installing grpc fixed my issues.
If you have a package depending on grpc
, install request
first.
yarn add request
yarn add grpc
A colleague mentioned that some the package "spike" is used if request is not available and that doesn't play nice with the company proxy. Dunno if that's actually the problem, but adding request
did fix the issue.
@MrEmanuel what about using NPM?
Im always getting that error if "any project that has firebase" inside it
or even when i want to install firebase globally, it always triggered to be installed but always error, i wish i know what happened inside it or whats wrong with my npm (i occurs too with yarn actually)
Most helpful comment
I found that the problem was that the package
request
was missing.Installing it before installing grpc fixed my issues.
If you have a package depending on
grpc
, installrequest
first.yarn add request
yarn add grpc
A colleague mentioned that some the package "spike" is used if request is not available and that doesn't play nice with the company proxy. Dunno if that's actually the problem, but adding
request
did fix the issue.