首页 > 解决方案 > 执行 npm start 时出错。未找到预构建的二进制文件

问题描述

我有一个大错误“未找到预构建的二进制文件”,它显示了这一点,我已经尝试重建和删除 node_modules 文件夹并再次运行 npm install,但我不断收到此错误。我从 github 下载了这个源代码:https ://github.com/TryCatchLearn/ReventsUpdate 。我的问题可能是什么?:

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.20.3/node-v79-win32-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not found for grpc@1.20.3 and node@13.2.0 (node-v79 ABI, unknown) (falling back to source compile with node-gyp)
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.  win_delay_load_hook.cc
C:\\Users\\cashamerica12345\\AppData\\Local\\node-gyp\\Cache\\13.2.0\\x64\\node.lib : fatal error LNK1107:
 invalid or corrupt file: cannot read at 0x5F266D [C:\Users\cashamerica12345\Documents\ReactReduxFirebase\
repo\ReventsUpdate-master\node_modules\grpc\build\WINDOWS_BUILD_WARNING.vcxproj]
  err_data.c
  a_bitstr.c
  a_bool.c

    C:\Users\cashamerica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-master\node_modules\grpc\deps\gr
pc\third_party\boringssl\crypto\asn1\a_strnid.c(67,1): error C2084: function 'ASN1_STRING_TABLE *sk_ASN1_S
TRING_TABLE_shift(stack_st_ASN1_STRING_TABLE *)' already has a bodyC:\Users\cashamerica12345\Documents\Rea
ctReduxFirebase\repo\ReventsUpdate-master\node_modules\grpc\deps\grpc\third_party\boringssl\crypto\asn1\a_
object.c(77,38): error C2037: left of 'length' specifies undefined struct/union 'asn1_object_st' [C:\Users
\cashamerica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-master\node_modules\grpc\build\boringssl
.vcxproj]
C:\Users\cashamerica12345\AppData\Local\node-gyp\Cache\13.2.0\include\node\openssl\asn1.h(194): message :
see previous definition of 'sk_ASN1_STRING_TABLE_shift' [C:\Users\cashamerica12345\Documents\ReactReduxFir
ebase\repo\ReventsUpdate-master\node_modules\grpc\build\boringssl.vcxproj]
C:\Users\cashamerica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-master\node_modules\grpc\deps\gr
pc\third_party\boringssl\include\openssl\base.h(231,13): error C2371: 'CRYPTO_THREADID': redefinition; dif
ferent basic types (compiling source file ..\deps\grpc\third_party\boringssl\crypto\asn1\a_time.c) [C:\Use
rs\cashamerica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-master\node_modules\grpc\build\borings
sl.vcxproj]
C:\Users\cashamerica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-master\node_modules\grpc\deps\gr
pc\third_party\boringssl\crypto\asn1\a_strnid.c(67,1): error C2084: function 'void sk_ASN1_STRING_TABLE_po
p_free(stack_st_ASN1_STRING_TABLE *,sk_ASN1_STRING_TABLE_freefunc)' already has a bodyC:\Users\cashamerica
12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-master\node_modules\grpc\deps\grpc\third_party\borin
gssl\crypto\asn1\a_object.c(77,59): error C2198: 'ASN1_object_size': too few arguments for call [C:\Users\
cashamerica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-master\node_modules\grpc\build\boringssl.
vcxproj]
C:\Users\cashamerica12345\AppData\Local\node-gyp\Cache\13.2.0\include\node\openssl\crypto.h(231): message
: see declaration of 'CRYPTO_THREADID' (compiling source file ..\deps\grpc\third_party\boringssl\crypto\as
n1\a_time.c) [C:\Users\cashamerica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-master\node_module
s\grpc\build\boringssl.vcxproj]
C:\Users\cashamerica12345\AppData\Local\node-gyp\Cache\13.2.0\include\node\openssl\asn1.h(194): message :
see previous definition of 'sk_ASN1_STRING_TABLE_pop_free' [C:\Users\cashamerica12345\Documents\ReactRedux
Firebase\repo\ReventsUpdate-master\node_modules\grpc\build\boringssl.vcxproj]
C:\Users\cashamerica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-master\node_modules\grpc\deps\gr
pc\third_party\boringssl\crypto\asn1\a_object.c(82,31): error C2037: left of 'length' specifies undefined
struct/union 'asn1_object_st' [C:\Users\cashamerica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-m
aster\node_modules\grpc\build\boringssl.vcxproj]
C:\Users\cashamerica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-master\node_modules\grpc\deps\gr
pc\third_party\boringssl\crypto\asn1\a_strnid.c(67,1): error C2084: function 'int sk_ASN1_STRING_TABLE_ins
ert(stack_st_ASN1_STRING_TABLE *,ASN1_STRING_TABLE *,int)' already has a body [C:\Users\cashamerica12345\D
ocuments\ReactReduxFirebase\repo\ReventsUpdate-master\node_modules\grpc\build\boringssl.vcxproj]
C:\Users\cashamerica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-master\node_modules\grpc\deps\gr
pc\third_party\boringssl\include\openssl\base.h(303,30): error C2371: 'EVP_MD_CTX': redefinition; differen
t basic types (compiling source file ..\deps\grpc\third_party\boringssl\crypto\asn1\a_time.c)C:\Users\cash
america12345\AppData\Local\node-gyp\Cache\13.2.0\include\node\openssl\asn1.h(194): note: see previous defi
nition of 'sk_ASN1_STRING_TABLE_insert' [C:\Users\cashamerica12345\Documents\ReactReduxFirebase\repo\Reven
tsUpdate-master\node_modules\grpc\build\boringssl.vcxproj]
C:\Users\cashamerica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-master\node_modules\grpc\deps\gr
pc\third_party\boringssl\include\openssl\base.h(147,1): warning C4005: 'OPENSSL_VERSION_NUMBER': macro red
efinition (compiling source file ..\deps\grpc\third_party\boringssl\crypto\asn1\a_type.c)C:\Users\cashamer
ica12345\AppData\Local\node-gyp\Cache\13.2.0\include\node\openssl\ossl_typ.h(92): note: see declaration of
 'EVP_MD_CTX' (compiling source file ..\deps\grpc\third_party\boringssl\crypto\asn1\a_time.c) [C:\Users\ca
shamerica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-master\node_modules\grpc\build\boringssl.vc
xproj]
C:\Users\cashamerica12345\AppData\Local\node-gyp\Cache\13.2.0\include\node\openssl\opensslv.h(42): message
 : see previous definition of 'OPENSSL_VERSION_NUMBER' (compiling source file ..\deps\grpc\third_party\bor
ingssl\crypto\asn1\a_type.c) [C:\Users\cashamerica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-ma
ster\node_modules\grpc\build\boringssl.vcxproj]
C:\Users\cashamerica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-master\node_modules\grpc\deps\gr
pc\third_party\boringssl\crypto\asn1\a_object.c(82,70): error C2198: 'ASN1_put_object': too few arguments
for call [C:\Users\cashamerica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-master\node_modules\gr
pc\build\boringssl.vcxproj]
C:\Users\cashamerica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-master\node_modules\grpc\deps\gr
pc\third_party\boringssl\include\openssl\base.h(182,1): warning C4005: 'OPENSSL_EXPORT': macro redefinitio
n (compiling source file ..\deps\grpc\third_party\boringssl\crypto\asn1\a_type.c)C:\Users\cashamerica12345
\Documents\ReactReduxFirebase\repo\ReventsUpdate-master\node_modules\grpc\deps\grpc\third_party\boringssl\
include\openssl\base.h(304,26): error C2371: 'EVP_MD': redefinition; different basic types (compiling sour
ce file ..\deps\grpc\third_party\boringssl\crypto\asn1\a_time.c)C:\Users\cashamerica12345\Documents\ReactR
eduxFirebase\repo\ReventsUpdate-master\node_modules\grpc\deps\grpc\third_party\boringssl\crypto\asn1\a_str
nid.c(67,1): error C2084: function 'ASN1_STRING_TABLE *sk_ASN1_STRING_TABLE_set(stack_st_ASN1_STRING_TABLE
 *,int,ASN1_STRING_TABLE *)' already has a body [C:\Users\cashamerica12345\Documents\ReactReduxFirebase\re
po\ReventsUpdate-master\node_modules\grpc\build\boringssl.vcxproj]
C:\Users\cashamerica12345\AppData\Local\node-gyp\Cache\13.2.0\include\node\openssl\e_os2.h(171): message :
 see previous definition of 'OPENSSL_EXPORT' (compiling source file ..\deps\grpc\third_party\boringssl\cry
pto\asn1\a_type.c)C:\Users\cashamerica12345\AppData\Local\node-gyp\Cache\13.2.0\include\node\openssl\ossl_
typ.h(91): note: see declaration of 'EVP_MD' (compiling source file ..\deps\grpc\third_party\boringssl\cry
pto\asn1\a_time.c) [C:\Users\cashamerica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-master\node_
modules\grpc\build\boringssl.vcxproj]
C:\Users\cashamerica12345\AppData\Local\node-gyp\Cache\13.2.0\include\node\openssl\asn1.h(194): message :
see previous definition of 'sk_ASN1_STRING_TABLE_set' [C:\Users\cashamerica12345\Documents\ReactReduxFireb
ase\repo\ReventsUpdate-master\node_modules\grpc\build\boringssl.vcxproj]
C:\Users\cashamerica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-master\node_modules\grpc\deps\gr
pc\third_party\boringssl\crypto\asn1\a_object.c(83,26): error C2037: left of 'data' specifies undefined st
ruct/union 'asn1_object_st' [C:\Users\cashamerica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-mas
ter\node_modules\grpc\build\boringssl.vcxproj]
C:\Users\cashamerica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-master\node_modules\grpc\deps\gr
pc\third_party\boringssl\include\openssl\base.h(308,34): error C2371: 'EVP_ENCODE_CTX': redefinition; diff
erent basic types (compiling source file ..\deps\grpc\third_party\boringssl\crypto\asn1\a_time.c)C:\Users\
cashamerica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-master\node_modules\grpc\deps\grpc\third_
party\boringssl\include\openssl\base.h(231,13): error C2371: 'CRYPTO_THREADID': redefinition; different ba
sic types (compiling source file ..\deps\grpc\third_party\boringssl\crypto\asn1\a_type.c)C:\Users\cashamer
ica12345\Documents\ReactReduxFirebase\repo\ReventsUpdate-master\node_modules\grpc\deps\grpc\third_party\bo
ringssl\crypto\asn1\a_strnid.c(67,1): error C2084: function 'int sk_ASN1_STRING_TABLE_find(stack_st_ASN1_S
TRING_TABLE *,ASN1_STRING_TABLE *)' already has a body [C:\Users\cashamerica12345\Documents\ReactReduxFire
base\repo\ReventsUpdate-master\node_modules\grpc\build\boringssl.vcxproj]

标签: javascriptreactjs

解决方案


这是 grpc@1.20.3 和 node@13.2.0 版本之间的问题。

我建议您执行以下操作:

1) 更新到 grpc@1.22.2 或更高版本。2)更新firebase插件中的firestore(已安装,它在package.json中引用了grpc)

希望这对你有帮助!


推荐阅读