Closed Starry200011 closed 3 months ago
outdated version of nodejs. please upgrade and try
This error still occurs after the upgrade
cc @nodejs/npm
This error still occurs after the upgrade
Which version are you using?
I see that a direct connection to an IP is being attempted and being answered with connection refused. That might be related to your environment and not NPM at all.
It seems there has been no activity on this issue for a while, and it is being closed in 30 days. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.
Details
Error reported when using npm install in Linux
Node.js version
node v8.11.0
Example code
xin@js:~/blockchain-trace-bcnetwork/webapp$ npm install npm WARN deprecated grpc@1.24.11: This library will not receive further updates other than security fixes. We recommend using @grpc/grpc-js instead. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated cloudant-follow@0.17.0: This package is no longer maintained. npm WARN deprecated har-validator@5.1.5: this library is no longer supported npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: connect ECONNREFUSED 104.20.22.46:443 gyp ERR! stack at Object._errnoException (util.js:992:11) gyp ERR! stack at _exceptionWithHostPort (util.js:1014:20) gyp ERR! stack at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14) gyp ERR! System Linux 5.4.0-150-generic gyp ERR! command "/usr/local/nodejs/bin/node" "/usr/local/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/xin/blockchain-trace-bcnetwork/webapp/node_modules/pkcs11js gyp ERR! node -v v8.11.4 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok
node-pre-gyp ERR! install request to https://node-precompiled-binaries.grpc.io/grpc/v1.24.11/node-v57-linux-x64-glibc.tar.gz failed, reason: unable to get local issuer certificate node-pre-gyp WARN Pre-built binaries not installable for grpc@1.24.11 and node@8.11.4 (node-v57 ABI, glibc) (falling back to source compile with node-gyp) node-pre-gyp WARN Hit error request to https://node-precompiled-binaries.grpc.io/grpc/v1.24.11/node-v57-linux-x64-glibc.tar.gz failed, reason: unable to get local issuer certificate gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: connect ECONNREFUSED 104.20.22.46:443 gyp ERR! stack at Object._errnoException (util.js:992:11) gyp ERR! stack at _exceptionWithHostPort (util.js:1014:20) gyp ERR! stack at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1186:14) gyp ERR! System Linux 5.4.0-150-generic gyp ERR! command "/usr/local/nodejs/bin/node" "/usr/local/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=/home/xin/blockchain-trace-bcnetwork/webapp/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/home/xin/blockchain-trace-bcnetwork/webapp/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v57" gyp ERR! cwd /home/xin/blockchain-trace-bcnetwork/webapp/node_modules/grpc gyp ERR! node -v v8.11.4 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/nodejs/bin/node /usr/local/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/home/xin/blockchain-trace-bcnetwork/webapp/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/xin/blockchain-trace-bcnetwork/webapp/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1) node-pre-gyp ERR! stack at ChildProcess.cmd.on (/home/xin/blockchain-trace-bcnetwork/webapp/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23) node-pre-gyp ERR! stack at emitTwo (events.js:126:13) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) node-pre-gyp ERR! System Linux 5.4.0-150-generic node-pre-gyp ERR! command "/usr/local/nodejs/bin/node" "/home/xin/blockchain-trace-bcnetwork/webapp/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library" node-pre-gyp ERR! cwd /home/xin/blockchain-trace-bcnetwork/webapp/node_modules/grpc node-pre-gyp ERR! node -v v8.11.4 node-pre-gyp ERR! node-pre-gyp -v v1.0.10 node-pre-gyp ERR! not ok Failed to execute '/usr/local/nodejs/bin/node /usr/local/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/home/xin/blockchain-trace-bcnetwork/webapp/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/xin/blockchain-trace-bcnetwork/webapp/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64-glibc --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v57' (1) npm WARN node-fetch@2.6.11 requires a peer of encoding@^0.1.0 but none is installed. You must install peer dependencies yourself. npm WARN webapp@1.0.0 No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: pkcs11js@1.3.1 (node_modules/pkcs11js): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: pkcs11js@1.3.1 install:
node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! grpc@1.24.11 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.24.11 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! /home/xin/.npm/_logs/2023-06-28T01_10_32_401Z-debug.log
Operating system
linux systems
Scope
npm install
Module and version
Not applicable.