首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >npm安装卡在reify grpc上

npm安装卡在reify grpc上
EN

Stack Overflow用户
提问于 2022-04-05 07:03:42
回答 2查看 877关注 0票数 1

在运行"npm安装“之后,我得到了这个错误。警告只出现在我的聊天和对话框的连接部分。我试图通过使用节点10和节点12来降低我的节点版本,但是错误仍然是persist.The错误状态,即使用grpc/grpc而不是grpc@1.24.11,但是包文件中没有grpc@1.24.11。我的节点和npm版本都在我提供的代码上。提前谢谢。以下是错误:

代码语言:javascript
复制
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' 

这是它在尝试将grpc具体化后产生的错误。

代码语言:javascript
复制
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```
EN

回答 2

Stack Overflow用户

发布于 2022-08-17 20:02:11

我在这里找到答案了,链接。在您的文件中使用@grpc/grpc而不是grpc。

票数 0
EN

Stack Overflow用户

发布于 2022-10-19 11:24:15

我遇到了同样的问题,问题是python没有安装在我的机器上,所以我安装了python并修复了问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71747513

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档