简体   繁体   中英

npm install stuck on reify grpc

I got this error after I run "npm install". The warning only appear on the connection part for my chatbot and dialogflow. I try to downgrade my node version by using node 10 and also node 12, but the error still persist.The error state that to use grpc/grpc-js instead of grpc@1.24.11, but I didn't have grpc@1.24.11 on my package file. My node and my npm version is on the code that I provide. Thanks in advance. Here is the error:

npm WARN EBADENGINE package: undefined,
npm WARN EBADENGINE required: { node: '10' },
npm WARN EBADENGINE current: { node: 'v17.8.0', npm: '8.5.5' }
npm WARN EBADENGINE }
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 ERR! code 1
npm ERR! path /home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! make: Entering directory '/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc/build' 

This is the error it gave after it try to reify grpc

npm ERR! make: Leaving directory '/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc/build'
npm ERR! Failed to execute '/usr/bin/node /usr/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc/src/node/extension_binary/node-v102-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc/src/node/extension_binary/node-v102-linux-x64-glibc --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v102' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@1.0.9
npm ERR! node-pre-gyp info using node@17.8.0 | linux | x64
npm ERR! node-pre-gyp info check checked for "/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc/src/node/extension_binary/node-v102-linux-x64-glibc/grpc_node.node" (not found)
npm ERR! node-pre-gyp http GET https://node-precompiled-binaries.grpc.io/grpc/v1.24.11/node-v102-linux-x64-glibc.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://node-precompiled-binaries.grpc.io/grpc/v1.24.11/node-v102-linux-x64-glibc.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for grpc@1.24.11 and node@17.8.0 (node-v102 ABI, glibc) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://node-precompiled-binaries.grpc.io/grpc/v1.24.11/node-v102-linux-x64-glibc.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@17.8.0 | linux | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@17.8.0 | linux | x64
npm ERR! gyp info find Python using Python version 3.10.4 found at "/usr/bin/python3"
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/lib/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/lib/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/home/zakwan/.cache/node-gyp/17.8.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/home/zakwan/.cache/node-gyp/17.8.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/lib/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/home/zakwan/.cache/node-gyp/17.8.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.0.0
npm ERR! gyp info using node@17.8.0 | linux | x64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In function ‘Slice sub_no_ref(const Slice&, size_t, size_t) [with Slice = grpc_slice]’,
npm ERR! inlined from ‘grpc_slice grpc_slice_sub_no_ref(grpc_slice, size_t, size_t)’ at ../deps/grpc/src/core/lib/slice/slice.cc:344:20,
npm ERR! inlined from ‘grpc_slice grpc_slice_sub(grpc_slice, size_t, size_t)’ at ../deps/grpc/src/core/lib/slice/slice.cc:361:35:
npm ERR! ../deps/grpc/src/core/lib/slice/slice.cc:337:11: warning: ‘void* memcpy(void*, const void*, size_t)’ forming offset 32 is out of the bounds [0, 32] of object ‘<anonymous>’ with type ‘grpc_slice’ [-Warray-bounds]
npm ERR! 337 | memcpy(subset.data.inlined.bytes, source.data.inlined.bytes + begin,
npm ERR! | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! 338 | end - begin);
npm ERR! | ~~~~~~~~~~~~
npm ERR! ../deps/grpc/src/core/lib/slice/slice.cc: In function ‘grpc_slice grpc_slice_sub(grpc_slice, size_t, size_t)’:
npm ERR! ../deps/grpc/src/core/lib/slice/slice.cc:352:12: note: ‘<anonymous>’ declared here
npm ERR! 352 | grpc_slice grpc_slice_sub(grpc_slice source, size_t begin, size_t end) {
npm ERR! | ^~~~~~~~~~~~~~
npm ERR! In file included from /home/zakwan/.cache/node-gyp/17.8.0/include/node/openssl/rsa.h:14,
npm ERR! from ../deps/grpc/src/core/lib/security/credentials/jwt/json_token.h:27,
npm ERR! from ../deps/grpc/src/core/lib/security/credentials/jwt/jwt_credentials.h:25,
npm ERR! from ../deps/grpc/src/core/lib/security/credentials/google_default/google_default_credentials.cc:41:
npm ERR! /home/zakwan/.cache/node-gyp/17.8.0/include/node/openssl/macros.h:155:4: error: #error "OPENSSL_API_COMPAT expresses an impossible API compatibility level"
npm ERR! 155 | # error "OPENSSL_API_COMPAT expresses an impossible API compatibility level"
npm ERR! | ^~~~~
npm ERR! make: *** [grpc.target.mk:546: Release/obj.target/grpc/deps/grpc/src/core/lib/security/credentials/google_default/google_default_credentials.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Linux 5.17.1-zen1-1-zen
npm ERR! gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc/src/node/extension_binary/node-v102-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc/src/node/extension_binary/node-v102-linux-x64-glibc" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v102"
npm ERR! gyp ERR! cwd /home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc
npm ERR! gyp ERR! node -v v17.8.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc/src/node/extension_binary/node-v102-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc/src/node/extension_binary/node-v102-linux-x64-glibc --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v102' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1090:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Linux 5.17.1-zen1-1-zen
npm ERR! node-pre-gyp ERR! command "/usr/bin/node" "/home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
npm ERR! node-pre-gyp ERR! cwd /home/zakwan/Documents/WORK/Project/Chatbot/hospitalX_chatbot/connectchat/functions/node_modules/grpc
npm ERR! node-pre-gyp ERR! node -v v17.8.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.9
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! /home/zakwan/.npm/_logs/2022-04-05T05_43_46_347Z-debug-0.log```

I found answer here link . Use @grpc/grpc-js instead grpc in your package.json file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM