grpc / grpc-node

gRPC for Node.js
https://grpc.io
Apache License 2.0
4.44k stars 640 forks source link

install grpc error #2826

Closed ujfjntevtee28230 closed 1 week ago

ujfjntevtee28230 commented 1 week ago

npm install

grpc@1.24.11 install /Users/luojx/project/doo/crm-ib/node_modules/grpc node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp ERR! install request to https://node-precompiled-binaries.grpc.io/grpc/v1.24.11/node-v83-darwin-arm64-unknown.tar.gz failed, reason: connect ETIMEDOUT 172.67.132.164:443 node-pre-gyp WARN Pre-built binaries not installable for grpc@1.24.11 and node@14.21.3 (node-v83 ABI, unknown) (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-v83-darwin-arm64-unknown.tar.gz failed, reason: connect ETIMEDOUT 172.67.132.164:443 gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: connect ETIMEDOUT 104.20.22.46:443 gyp ERR! stack at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1159:16) gyp ERR! System Darwin 22.6.0 gyp ERR! command "/Users/luojx/.nvm/versions/node/v14.21.3/bin/node" "/Users/luojx/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=/Users/luojx/project/doo/crm-ib/node_modules/grpc/src/node/extension_binary/node-v83-darwin-arm64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/luojx/project/doo/crm-ib/node_modules/grpc/src/node/extension_binary/node-v83-darwin-arm64-unknown" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83" gyp ERR! cwd /Users/luojx/project/doo/crm-ib/node_modules/grpc gyp ERR! node -v v14.21.3 gyp ERR! node-gyp -v v5.1.1 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/Users/luojx/.nvm/versions/node/v14.21.3/bin/node /Users/luojx/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/Users/luojx/project/doo/crm-ib/node_modules/grpc/src/node/extension_binary/node-v83-darwin-arm64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/luojx/project/doo/crm-ib/node_modules/grpc/src/node/extension_binary/node-v83-darwin-arm64-unknown --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1) node-pre-gyp ERR! stack at ChildProcess. (/Users/luojx/project/doo/crm-ib/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:400:28) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1088:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5) node-pre-gyp ERR! System Darwin 22.6.0 node-pre-gyp ERR! command "/Users/luojx/.nvm/versions/node/v14.21.3/bin/node" "/Users/luojx/project/doo/crm-ib/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library" node-pre-gyp ERR! cwd /Users/luojx/project/doo/crm-ib/node_modules/grpc node-pre-gyp ERR! node -v v14.21.3 node-pre-gyp ERR! node-pre-gyp -v v1.0.10 node-pre-gyp ERR! not ok Failed to execute '/Users/luojx/.nvm/versions/node/v14.21.3/bin/node /Users/luojx/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/Users/luojx/project/doo/crm-ib/node_modules/grpc/src/node/extension_binary/node-v83-darwin-arm64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/luojx/project/doo/crm-ib/node_modules/grpc/src/node/extension_binary/node-v83-darwin-arm64-unknown --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1) npm WARN @ant-design/icons-react@2.0.1 requires a peer of react@16.x but none is installed. You must install peer dependencies yourself. npm WARN react-slick@0.24.0 requires a peer of react@^0.14.0 || ^15.0.1 || ^16.0.0 but none is installed. You must install peer dependencies yourself. npm WARN react-slick@0.24.0 requires a peer of react-dom@^0.14.0 || ^15.0.1 || ^16.0.0 but none is installed. You must install peer dependencies yourself. npm WARN cosmiconfig-typescript-loader@4.3.0 requires a peer of cosmiconfig@>=7 but none is installed. You must install peer dependencies yourself. npm WARN cosmiconfig-typescript-loader@4.3.0 requires a peer of ts-node@>=10 but none is installed. You must install peer dependencies yourself. npm WARN draft-js@0.10.5 requires a peer of react@^0.14.0 || ^15.0.0-rc || ^16.0.0-rc || ^16.0.0 but none is installed. You must install peer dependencies yourself. npm WARN draft-js@0.10.5 requires a peer of react-dom@^0.14.0 || ^15.0.0-rc || ^16.0.0-rc || ^16.0.0 but none is installed. You must install peer dependencies yourself. npm WARN qrcode.react@1.0.0 requires a peer of react@^15.5.3 || ^16.0.0 but none is installed. You must install peer dependencies yourself. npm WARN rc-switch@1.9.2 requires a peer of react@^16.0.0 but none is installed. You must install peer dependencies yourself. npm WARN rc-switch@1.9.2 requires a peer of react-dom@^16.0.0 but none is installed. You must install peer dependencies yourself. npm WARN react-cropper@1.3.0 requires a peer of react@^0.14.0 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself. npm WARN react-lottie@1.2.3 requires a peer of react@^0.14.7 || ^15.0.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself. npm WARN react-redux@5.1.2 requires a peer of react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0 but none is installed. You must install peer dependencies yourself. npm WARN react-slick@0.25.2 requires a peer of react@^0.14.0 || ^15.0.1 || ^16.0.0 but none is installed. You must install peer dependencies yourself. npm WARN react-slick@0.25.2 requires a peer of react-dom@^0.14.0 || ^15.0.1 || ^16.0.0 but none is installed. You must install peer dependencies yourself. npm WARN update-browserslist-db@1.0.11 requires a peer of browserslist@>= 4.21.0 but none is installed. You must install peer dependencies yourself. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @sentry/cli-linux-arm@2.32.1 (node_modules/@sentry/cli-linux-arm): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @sentry/cli-linux-arm@2.32.1: wanted {"os":"linux,freebsd","arch":"arm"} (current: {"os":"darwin","arch":"arm64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @sentry/cli-linux-x64@2.32.1 (node_modules/@sentry/cli-linux-x64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @sentry/cli-linux-x64@2.32.1: wanted {"os":"linux,freebsd","arch":"x64"} (current: {"os":"darwin","arch":"arm64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @sentry/cli-linux-arm64@2.32.1 (node_modules/@sentry/cli-linux-arm64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @sentry/cli-linux-arm64@2.32.1: wanted {"os":"linux,freebsd","arch":"arm64"} (current: {"os":"darwin","arch":"arm64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @sentry/cli-win32-i686@2.32.1 (node_modules/@sentry/cli-win32-i686): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @sentry/cli-win32-i686@2.32.1: wanted {"os":"win32","arch":"x86,ia32"} (current: {"os":"darwin","arch":"arm64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @sentry/cli-win32-x64@2.32.1 (node_modules/@sentry/cli-win32-x64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @sentry/cli-win32-x64@2.32.1: wanted {"os":"win32","arch":"x64"} (current: {"os":"darwin","arch":"arm64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @sentry/cli-linux-i686@2.32.1 (node_modules/@sentry/cli-linux-i686): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @sentry/cli-linux-i686@2.32.1: wanted {"os":"linux,freebsd","arch":"x86,ia32"} (current: {"os":"darwin","arch":"arm64"})

npm 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! /Users/luojx/.npm/_logs/2024-09-13T03_58_29_032Z-debug.log

Chip: Apple M2 Pro OS: 13.5.1 node: 14.21.3

I have been troubled by this problem for a day now, seeking advice from all the experts!

murgatroid99 commented 1 week ago

The grpc library is deprecated and unmaintained. We recommend using @grpc/grpc-js instead.

The specific reason you are encountering this error is that the grpc library does not support the ARM64 architecture on Mac, and that is the platform the error indicates that you are trying to install on.