Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't install grpc npm-package

I have a problem with grpc npm-package. When I run a npm i it starts with:

> [email protected] install C:\RELOG\relog\node_modules\grpc
> node-pre-gyp install --fallback-to-build --library=static_library

then there is a lot errors with node-gyp, that starts with:

PS C:\RELOG\relog> npm i fcm-node                                                                                                                                                                                                            
> [email protected] install C:\RELOG\relog\node_modules\grpc
> node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error connect ETIMEDOUT 104.28.23.74:443
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
  win_delay_load_hook.cc
  WINDOWS_BUILD_WARNING.vcxproj -> C:\RELOG\relog\node_modules\grpc\build\Release\\WINDOWS_BUILD_WARNING.node
  address_sorting.c
  address_sorting_posix.c
  address_sorting_windows.c
  win_delay_load_hook.cc
  address_sorting.vcxproj -> C:\RELOG\relog\node_modules\grpc\build\Release\\libaddress_sorting.lib
  ares__close_sockets.c
  ares__get_hostent.c
  ares__read_line.c
  ares__timeval.c
  ares_cancel.c
  ares_create_query.c
  ares_data.c
  ares_destroy.c
  ares_expand_name.c
  ares_expand_string.c
  ares_fds.c
  ares_free_hostent.c
  ares_free_string.c
C:\RELOG\relog\node_modules\grpc\deps\grpc\third_party\cares\cares\ares__get_hostent.c(141,32): warning C4996: 'inet_addr': Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnin
gs [C:\RELOG\relog\node_modules\grpc\build\ares.vcxproj]
  ares_getenv.c
  ares_gethostbyaddr.c
  ares_gethostbyname.c
  ares_getnameinfo.c
  ares_getopt.c
  ares_getsock.c
  ares_init.c
  ares_library_init.c
  ares_llist.c
  ares_mkquery.c
  ares_nowarn.c
  ares_options.c
  ares_parse_a_reply.c
C:\RELOG\relog\node_modules\grpc\deps\grpc\third_party\cares\cares\ares_gethostbyname.c(275,32): warning C4996: 'inet_addr': Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warni
ngs [C:\RELOG\relog\node_modules\grpc\build\ares.vcxproj]
  ares_parse_aaaa_reply.c
  ares_parse_mx_reply.c
  ares_parse_naptr_reply.c
  ares_parse_ns_reply.c
  ares_parse_ptr_reply.c
C:\RELOG\relog\node_modules\grpc\deps\grpc\third_party\cares\cares\ares_init.c(2421,18): warning C4996: 'inet_addr': Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [C:\
RELOG\relog\node_modules\grpc\build\ares.vcxproj]
  ares_parse_soa_reply.c
  ares_parse_srv_reply.c
  ares_parse_txt_reply.c
  ares_platform.c
  ares_process.c
  ares_query.c
  ares_search.c
  ares_send.c
  ares_strcasecmp.c
  ares_strdup.c
  ares_strerror.c
  ares_strsplit.c
  ares_timeout.c
  ares_version.c
  ares_writev.c
  bitncmp.c
  inet_net_pton.c
  inet_ntop.c
  windows_port.c
  win_delay_load_hook.cc
  ares.vcxproj -> C:\RELOG\relog\node_modules\grpc\build\Release\\libares.lib
  err_data.c
  a_bitstr.c
  a_bool.c
  a_d2i_fp.c
  a_dup.c
  a_enum.c
  a_gentm.c
  a_i2d_fp.c
  a_int.c
  a_mbstr.c
  a_object.c
  a_octet.c
C:\RELOG\relog\node_modules\grpc\deps\grpc\third_party\boringssl\include\openssl\base.h(147,1): warning C4005: 'OPENSSL_VERSION_NUMBER': macro redefinition (compiling source file ..\deps\grpc\src\boringssl\err_data.c) [C:\RELOG\relog\no
de_modules\grpc\build\boringssl.vcxproj]
C:\Users\crimpyhead\AppData\Local\node-gyp\Cache\12.16.2\include\node\openssl\opensslv.h(42): message : see previous definition of 'OPENSSL_VERSION_NUMBER' (compiling source file ..\deps\grpc\src\boringssl\err_data.c) [C:\RELOG\relog\no
de_modules\grpc\build\boringssl.vcxproj]
C:\Users\crimpyhead\AppData\Local\node-gyp\Cache\12.16.2\include\node\openssl\e_os2.h(171,1): warning C4005: 'OPENSSL_EXPORT': macro redefinition (compiling source file ..\deps\grpc\src\boringssl\err_data.c) [C:\RELOG\relog\node_modules
\grpc\build\boringssl.vcxproj]
C:\RELOG\relog\node_modules\grpc\deps\grpc\third_party\boringssl\include\openssl\base.h(182): message : see previous definition of 'OPENSSL_EXPORT' (compiling source file ..\deps\grpc\src\boringssl\err_data.c) [C:\RELOG\relog\node_modul
es\grpc\build\boringssl.vcxproj]
C:\Users\crimpyhead\AppData\Local\node-gyp\Cache\12.16.2\include\node\openssl\ossl_typ.h(91,26): error C2371: 'EVP_MD': redefinition; different basic types (compiling source file ..\deps\grpc\src\boringssl\err_data.c) [C:\RELOG\relog\no
de_modules\grpc\build\boringssl.vcxproj]
C:\RELOG\relog\node_modules\grpc\deps\grpc\third_party\boringssl\include\openssl\base.h(304): message : see declaration of 'EVP_MD' (compiling source file ..\deps\grpc\src\boringssl\err_data.c) [C:\RELOG\relog\node_modules\grpc\build\bo
ringssl.vcxproj]
C:\Users\crimpyhead\AppData\Local\node-gyp\Cache\12.16.2\include\node\openssl\ossl_typ.h(92,30): error C2371: 'EVP_MD_CTX': redefinition; different basic types (compiling source file ..\deps\grpc\src\boringssl\err_data.c) [C:\RELOG\relo
g\node_modules\grpc\build\boringssl.vcxproj]
C:\RELOG\relog\node_modules\grpc\deps\grpc\third_party\boringssl\include\openssl\base.h(303): message : see declaration of 'EVP_MD_CTX' (compiling source file ..\deps\grpc\src\boringssl\err_data.c) [C:\RELOG\relog\node_modules\grpc\buil
d\boringssl.vcxproj]
C:\Users\crimpyhead\AppData\Local\node-gyp\Cache\12.16.2\include\node\openssl\ossl_typ.h(100,34): error C2371: 'EVP_ENCODE_CTX': redefinition; different basic types (compiling source file ..\deps\grpc\src\boringssl\err_data.c) [C:\RELOG
\relog\node_modules\grpc\build\boringssl.vcxproj]
C:\RELOG\relog\node_modules\grpc\deps\grpc\third_party\boringssl\include\openssl\base.h(308): message : see declaration of 'EVP_ENCODE_CTX' (compiling source file ..\deps\grpc\src\boringssl\err_data.c) [C:\RELOG\relog\node_modules\grpc\
build\boringssl.vcxproj]
C:\Users\crimpyhead\AppData\Local\node-gyp\Cache\12.16.2\include\node\openssl\crypto.h(231,3): error C2371: 'CRYPTO_THREADID': redefinition; different basic types (compiling source file ..\deps\grpc\src\boringssl\err_data.c) [C:\RELOG\r
elog\node_modules\grpc\build\boringssl.vcxproj]
C:\RELOG\relog\node_modules\grpc\deps\grpc\third_party\boringssl\include\openssl\base.h(231): message : see declaration of 'CRYPTO_THREADID' (compiling source file ..\deps\grpc\src\boringssl\err_data.c) [C:\RELOG\relog\node_modules\grpc
\build\boringssl.vcxproj]
C:\RELOG\relog\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(33,1): error C2118: negative subscript [C:\RELOG\relog\node_modules\grpc\build\boringssl.vcxproj]
C:\RELOG\relog\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(34,1): error C2118: negative subscript [C:\RELOG\relog\node_modules\grpc\build\boringssl.vcxproj]
C:\RELOG\relog\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(35,1): error C2118: negative subscript [C:\RELOG\relog\node_modules\grpc\build\boringssl.vcxproj]
C:\RELOG\relog\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(36,1): error C2118: negative subscript [C:\RELOG\relog\node_modules\grpc\build\boringssl.vcxproj]
C:\RELOG\relog\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(37,1): error C2118: negative subscript [C:\RELOG\relog\node_modules\grpc\build\boringssl.vcxproj]
C:\RELOG\relog\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(38,1): error C2118: negative subscript [C:\RELOG\relog\node_modules\grpc\build\boringssl.vcxproj]
C:\RELOG\relog\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(39,1): error C2118: negative subscript [C:\RELOG\relog\node_modules\grpc\build\boringssl.vcxproj]
C:\RELOG\relog\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(40,1): error C2065: 'ERR_LIB_PKCS8': undeclared identifier [C:\RELOG\relog\node_modules\grpc\build\boringssl.vcxproj]
C:\RELOG\relog\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(40,1): error C2057: expected constant expression [C:\RELOG\relog\node_modules\grpc\build\boringssl.vcxproj]
C:\RELOG\relog\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(40,1): error C2466: cannot allocate an array of constant size 0 [C:\RELOG\relog\node_modules\grpc\build\boringssl.vcxproj]
C:\RELOG\relog\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(41,1): error C2118: negative subscript [C:\RELOG\relog\node_modules\grpc\build\boringssl.vcxproj]
C:\RELOG\relog\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(42,1): error C2118: negative subscript [C:\RELOG\relog\node_modules\grpc\build\boringssl.vcxproj]
C:\RELOG\relog\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(43,1): error C2118: negative subscript [C:\RELOG\relog\node_modules\grpc\build\boringssl.vcxproj]
C:\RELOG\relog\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(44,1): error C2118: negative subscript [C:\RELOG\relog\node_modules\grpc\build\boringssl.vcxproj]
C:\RELOG\relog\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(45,1): error C2118: negative subscript [C:\RELOG\relog\node_modules\grpc\build\boringssl.vcxproj]
C:\RELOG\relog\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(46,1): error C2118: negative subscript [C:\RELOG\relog\node_modules\grpc\build\boringssl.vcxproj]

and in the end it shows this:

gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:310:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=C:\\RELOG\\relog\\node_modules\\grpc\\src\\node\\extension_binary\\node-v72-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\\RELOG\\relog\\node_modules\\grpc\\src\\node\\extension_binary\\node-v72-win32-x64-unknown" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd C:\RELOG\relog\node_modules\grpc
gyp ERR! node -v v12.16.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=C:\RELOG\relog\node_modules\grpc\src\node\extension_binary\node-v72-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\RELOG\relog\node_modules\grpc\src\node\extension_binary\node-v72-win32-x64-unknown --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\RELOG\relog\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:310:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Windows_NT 10.0.18363
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\RELOG\\relog\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd C:\RELOG\relog\node_modules\grpc
node-pre-gyp ERR! node -v v12.16.2
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=C:\RELOG\relog\node_modules\grpc\src\node\extension_binary\node-v72-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\RELOG\relog\node_modules\grpc\src\node\extension_binary\node-v72-win32-x64-unknown --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
npm WARN [email protected] requires a peer of webpack@1 || 2 || ^2.1.0-beta || ^2.2.0-rc but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of leaflet@^1.3.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of leaflet@~1.3.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of leaflet@^1.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@>=^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react-dom@>=^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of vis-timeline@^5.x but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\grpc):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

I have an Windows 10 VS 2017 with Dev C++ python2.7 added to PATH Every thing that is included here https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#environment-setup-and-configuration

Also, I have tried to install grpc alone npm i grpc. But it gives the same error.

like image 698
Yerbol Suleimanov Avatar asked Apr 14 '20 12:04

Yerbol Suleimanov


1 Answers

For me the solution was to install grpc globally.

npm install grpc -g
like image 102
Semra Avatar answered Oct 06 '22 22:10

Semra