首页 > 解决方案 > 尝试在 npm install 期间修复许多错误

问题描述

尝试克隆并重新安装几次,但错误仍然存​​在。此外,尝试 npm install/update --force,删除 node_modules 和 package-lock,更新 node/npm,安装 windows-build-tools 但没有任何效果......(我删除了部分错误,因为它是两倍长)我将不胜感激在这件事上的任何帮助!:)

    npm ERR! code 1
    npm ERR! path C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc
    npm ERR! command failed
    npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build --library=static_library
    npm ERR! Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
    npm ERR!   win_delay_load_hook.cc
    npm ERR!   Generating code
    npm ERR!   All 1 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
    npm ERR!   Finished generating code
    npm ERR!   WINDOWS_BUILD_WARNING.vcxproj -> C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\Release\\WINDOWS_BUILD_WARNING.node
    npm ERR!   address_sorting.c
    npm ERR!   address_sorting_posix.c
    npm ERR!   address_sorting_windows.c
    npm ERR!   win_delay_load_hook.cc
    npm ERR!   address_sorting.vcxproj -> C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\Release\\libaddress_sorting.lib
    npm ERR!   ares__close_sockets.c
    npm ERR!   ares__get_hostent.c
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\third_party\cares\cares\ares__get_hostent.c(141): warning C4996: 'inet_addr': Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\ares.vcxproj]
    npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1831): note: see declaration of 'inet_addr'
    npm ERR!   ares__read_line.c
    npm ERR!   ares__timeval.c
    npm ERR!   ares_cancel.c
    npm ERR!   ares_create_query.c
    npm ERR!   ares_data.c
    npm ERR!   ares_destroy.c
    npm ERR!   ares_expand_name.c
    npm ERR!   ares_expand_string.c
    npm ERR!   ares_fds.c
    npm ERR!   ares_free_hostent.c
    npm ERR!   ares_free_string.c
    npm ERR!   ares_getenv.c
    npm ERR!   ares_gethostbyaddr.c
    npm ERR!   ares_gethostbyname.c
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\third_party\cares\cares\ares_gethostbyname.c(275): warning C4996: 'inet_addr': Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\ares.vcxproj]
    npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1831): note: see declaration of 'inet_addr'
    npm ERR!   ares_getnameinfo.c
    npm ERR!   ares_getopt.c
    npm ERR!   ares_getsock.c
    npm ERR!   ares_init.c
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\third_party\cares\cares\ares_init.c(2421): warning C4996: 'inet_addr': 
    Use inet_pton() or InetPton() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\ares.vcxproj]
    npm ERR!   c:\program files (x86)\windows kits\10\include\10.0.17763.0\um\winsock2.h(1831): note: see declaration of 'inet_addr'
    npm ERR!   c:\users\dana\appdata\local\node-gyp\cache\14.17.3\include\node\openssl\opensslv.h(42): note: see previous definition of 'OPENSSL_VERSION_NUMBER'
    npm ERR! c:\users\dana\appdata\local\node-gyp\cache\14.17.3\include\node\openssl\e_os2.h(171): warning C4005: 'OPENSSL_EXPORT': macro redefinition [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR!   c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\third_party\boringssl\include\openssl\base.h(182): note: see previous definition of 'OPENSSL_EXPORT'
    npm ERR! c:\users\dana\appdata\local\node-gyp\cache\14.17.3\include\node\openssl\ossl_typ.h(91): error C2371: 'EVP_MD': redefinition; different basic types [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR!   c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\third_party\boringssl\include\openssl\base.h(304): note: see declaration of 'EVP_MD'
    npm ERR! c:\users\dana\appdata\local\node-gyp\cache\14.17.3\include\node\openssl\ossl_typ.h(92): error C2371: 'EVP_MD_CTX': redefinition; different basic types [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR!   c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\third_party\boringssl\include\openssl\base.h(303): note: see declaration of 'EVP_MD_CTX'
    npm ERR! c:\users\dana\appdata\local\node-gyp\cache\14.17.3\include\node\openssl\ossl_typ.h(100): error C2371: 'EVP_ENCODE_CTX': redefinition; different basic types [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR!   c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\third_party\boringssl\include\openssl\base.h(308): note: see declaration of 'EVP_ENCODE_CTX'
    npm ERR! c:\users\dana\appdata\local\node-gyp\cache\14.17.3\include\node\openssl\crypto.h(231): error C2371: 'CRYPTO_THREADID': redefinition; different basic types [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR!   c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\third_party\boringssl\include\openssl\base.h(231): note: see declaration of 'CRYPTO_THREADID'
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(33): error C2118: negative subscript [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(34): error C2118: negative subscript [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(35): error C2118: negative subscript [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(36): error C2118: negative subscript [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(37): error C2118: negative subscript [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(38): error C2118: negative subscript [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(39): error C2118: negative subscript [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(40): error C2065: 'ERR_LIB_PKCS8': undeclared 
    identifier [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(40): error C2057: expected constant expression [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(40): error C2466: cannot allocate an array of 
    constant size 0 [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(41): error C2118: negative subscript [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(42): error C2118: negative subscript [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(43): error C2118: negative subscript [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(44): error C2118: negative subscript [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(45): error C2118: negative subscript [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(46): error C2118: negative subscript [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(47): error C2118: negative subscript [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(48): error C2118: negative subscript [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(49): error C2118: negative subscript [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(50): error C2065: 'ERR_LIB_DIGEST': undeclared identifier [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(50): error C2057: expected constant expression [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(50): error C2466: cannot allocate an array of 
    constant size 0 [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(51): error C2065: 'ERR_LIB_CIPHER': undeclared identifier [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(51): error C2057: expected constant expression [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(51): error C2466: cannot allocate an array of 
    constant size 0 [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(52): error C2065: 'ERR_LIB_HKDF': undeclared identifier [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(52): error C2057: expected constant expression [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(52): error C2466: cannot allocate an array of 
    constant size 0 [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(53): error C2118: negative subscript [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(54): error C2065: 'ERR_NUM_LIBS': undeclared identifier [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(54): error C2057: expected constant expression [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\boringssl\err_data.c(54): error C2466: cannot allocate an array of 
    constant size 0 [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\boringssl.vcxproj]
    npm ERR!   alloc.cc
 workshop\node_modules\grpc\deps\grpc\src\core\lib\iomgr\resource_quota.cc(943): warning C4146: unary minus operator applied to unsigned type, result still unsigned [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\grpc.vcxproj]
    npm ERR!   sockaddr_utils.cc
    npm ERR!   socket_factory_posix.cc
    npm ERR!   socket_mutator.cc
    npm ERR!   socket_utils_common_posix.cc
    npm ERR!   socket_utils_linux.cc
    npm ERR!   socket_utils_posix.cc
    npm ERR!   socket_utils_uv.cc
    npm ERR!   socket_utils_windows.cc
    npm ERR!   socket_windows.cc
    npm ERR!   tcp_client.cc
    npm ERR!   tcp_client_cfstream.cc
    npm ERR!   tcp_client_custom.cc
    npm ERR!   tcp_client_posix.cc
    npm ERR!   tcp_client_windows.cc
    npm ERR!   tcp_custom.cc
    npm ERR!   tcp_posix.cc
    npm ERR!   tcp_server.cc
    npm ERR!   tcp_server_custom.cc
    npm ERR!   tcp_server_posix.cc
    npm ERR!   tcp_server_utils_posix_common.cc
    npm ERR!   tcp_server_utils_posix_ifaddrs.cc
    npm ERR!   tcp_server_utils_posix_noifaddrs.cc
    npm ERR!   tcp_server_windows.cc
    npm ERR!   tcp_uv.cc
    npm ERR!   tcp_windows.cc
    npm ERR!   time_averaged_stats.cc
    npm ERR!   timer.cc
    npm ERR!   timer_custom.cc
    npm ERR!   timer_generic.cc
    npm ERR!   timer_heap.cc
    npm ERR!   timer_manager.cc
    npm ERR!   timer_uv.cc
    npm ERR!   udp_server.cc
    npm ERR!   unix_sockets_posix.cc
    npm ERR!   unix_sockets_posix_noop.cc
    npm ERR!   wakeup_fd_eventfd.cc
    npm ERR!   wakeup_fd_nospecial.cc
    npm ERR!   wakeup_fd_pipe.cc
    npm ERR!   wakeup_fd_posix.cc
    npm ERR!   json.cc
    npm ERR!   json_reader.cc
    npm ERR!   json_string.cc
    npm ERR!   json_writer.cc
    npm ERR!   b64.cc
    npm ERR!   percent_encoding.cc
    npm ERR!   slice.cc
    npm ERR!   slice_buffer.cc
    npm ERR!   slice_intern.cc
    npm ERR!   slice_string_helpers.cc
    npm ERR!   api_trace.cc
    npm ERR!   byte_buffer.cc
    npm ERR!   byte_buffer_reader.cc
    npm ERR!   call.cc
    npm ERR!   call_details.cc
    npm ERR!   call_log_batch.cc
    npm ERR!   channel.cc
    npm ERR!   channel_init.cc
    npm ERR!   channel_ping.cc
    npm ERR!   channel_stack_type.cc
    npm ERR!   completion_queue.cc
    npm ERR!   completion_queue_factory.cc
    npm ERR!   event_string.cc
    npm ERR!   lame_client.cc
    npm ERR!   metadata_array.cc
    npm ERR!   server.cc
    npm ERR!   validate_metadata.cc
    npm ERR!   version.cc
    npm ERR!   bdp_estimator.cc
    npm ERR!   byte_stream.cc
    npm ERR!   connectivity_state.cc
    npm ERR!   error_utils.cc
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\core\lib\iomgr\error_internal.h(58): warning C4200: nonstandard extension used: zero-sized array in struct/union [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\grpc.vcxproj]
    npm ERR!   c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\core\lib\iomgr\error_internal.h(58): note: This member will be ignored by a defaulted constructor or copy/move assignment operator
    npm ERR!   metadata.cc
    npm ERR!   metadata_batch.cc
    npm ERR!   pid_controller.cc
    npm ERR!   static_metadata.cc
    npm ERR!   status_conversion.cc
    npm ERR!   status_metadata.cc
    npm ERR!   timeout_encoding.cc
    npm ERR!   transport.cc
    npm ERR!   transport_op_string.cc
    npm ERR!   uri_parser.cc
    npm ERR!   trace.cc
    npm ERR!   server_secure_chttp2.cc
    npm ERR!   bin_decoder.cc
    npm ERR!   bin_encoder.cc
    npm ERR!   chttp2_plugin.cc
    npm ERR!   chttp2_transport.cc
    npm ERR!   context_list.cc
    npm ERR!   flow_control.cc
    npm ERR!   frame_data.cc
    npm ERR!   frame_goaway.cc
    npm ERR!   frame_ping.cc
    npm ERR!   frame_rst_stream.cc
    npm ERR!   frame_settings.cc
    npm ERR!   frame_window_update.cc
    npm ERR!   hpack_encoder.cc
    npm ERR!   hpack_parser.cc
    npm ERR!   hpack_table.cc
    npm ERR!   http2_settings.cc
    npm ERR!   huffsyms.cc
    npm ERR!   incoming_metadata.cc
    npm ERR!   parsing.cc
    npm ERR!   stream_lists.cc
    npm ERR!   stream_map.cc
    npm ERR!   varint.cc
    npm ERR!   writing.cc
    npm ERR! c:\users\dana\desktop\dev\hooks-workshop\node_modules\grpc\deps\grpc\src\core\ext\transport\chttp2\transport\writing.cc(542): warning C4804: '>': unsafe use of type 'bool' in operation [C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\build\grpc.vcxp
  workshop\node_modules\grpc\build\Release\\libz.lib
    npm ERR! Failed to execute 'C:\nodejs\node.exe C:\Users\Dana\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
    npm ERR! node-pre-gyp info it worked if it ends with ok
    npm ERR! node-pre-gyp info using node-pre-gyp@0.13.0
    npm ERR! node-pre-gyp info using node@14.17.3 | win32 | x64
    npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download
    npm ERR! node-pre-gyp info check checked for "C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown\grpc_node.node" (not found)
    npm ERR! node-pre-gyp http GET https://node-precompiled-binaries.grpc.io/grpc/v1.23.3/node-v83-win32-x64-unknown.tar.gz
    npm ERR! node-pre-gyp http 404 https://node-precompiled-binaries.grpc.io/grpc/v1.23.3/node-v83-win32-x64-unknown.tar.gz
    npm ERR! node-pre-gyp WARN Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.23.3/node-v83-win32-x64-unknown.tar.gz
    npm ERR! node-pre-gyp WARN Pre-built binaries not found for grpc@1.23.3 and node@14.17.3 (node-v83 ABI, unknown) (falling back to source compile with node-gyp)
    npm ERR! node-pre-gyp http 404 status code downloading tarball https://node-precompiled-binaries.grpc.io/grpc/v1.23.3/node-v83-win32-x64-unknown.tar.gz
    npm ERR! gyp info it worked if it ends with ok
    npm ERR! gyp info using node-gyp@7.1.2
    npm ERR! gyp info using node@14.17.3 | win32 | x64
    npm ERR! gyp info ok
    npm ERR! gyp info it worked if it ends with ok
    npm ERR! gyp info using node-gyp@7.1.2
    npm ERR! gyp info using node@14.17.3 | win32 | x64
    npm ERR! gyp info find Python using Python version 3.9.5 found at "C:\Users\Dana\AppData\Local\Programs\Python\Python39\python.exe"
    npm ERR! gyp info find VS using VS2017 (15.9.28307.1525) found at:
    npm ERR! gyp info find VS "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools"
    npm ERR! gyp info find VS run with --verbose for detailed information
    npm ERR! gyp info spawn C:\Users\Dana\AppData\Local\Programs\Python\Python39\python.exe
    npm ERR! gyp info spawn args [
    npm ERR! gyp info spawn args   'C:\\Users\\Dana\\AppData\\Roaming\\npm\\node_modules\\npm\\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   'msvs',
    npm ERR! gyp info spawn args   '-I',
    npm ERR! gyp info spawn args   'C:\\Users\\Dana\\Desktop\\dev\\hooks-workshop\\node_modules\\grpc\\build\\config.gypi',
    npm ERR! gyp info spawn args   '-I',
    npm ERR! gyp info spawn args   'C:\\Users\\Dana\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
    npm ERR! gyp info spawn args   '-I',
    npm ERR! gyp info spawn args   'C:\\Users\\Dana\\AppData\\Local\\node-gyp\\Cache\\14.17.3\\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=C:\\Users\\Dana\\AppData\\Local\\node-gyp\\Cache\\14.17.3',
    npm ERR! gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\Dana\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp',
    npm ERR! gyp info spawn args   '-Dnode_lib_file=C:\\\\Users\\\\Dana\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\14.17.3\\\\<(target_arch)\\\\node.lib',
    npm ERR! gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\Dana\\Desktop\\dev\\hooks-workshop\\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   'C:\\Users\\Dana\\Desktop\\dev\\hooks-workshop\\node_modules\\grpc\\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@7.1.2
    npm ERR! gyp info using node@14.17.3 | win32 | x64
    npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
    npm ERR! gyp info spawn args [
    npm ERR! gyp info spawn args   'build/binding.sln',
    npm ERR! gyp info spawn args   '/clp:Verbosity=minimal',
    npm ERR! gyp info spawn args   '/nologo',
    npm ERR! gyp info spawn args   '/p:Configuration=Release;Platform=x64'
    npm ERR! gyp info spawn args ]
    npm ERR! gyp ERR! build error
    npm ERR! gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1npm ERR! gyp ERR! stack     at ChildProcess.onExit (C:\Users\Dana\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)    
    npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:375:28)
    npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
    npm ERR! gyp ERR! System Windows_NT 10.0.19042
    npm ERR! gyp ERR! command "C:\\nodejs\\node.exe" "C:\\Users\\Dana\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=C:\\Users\\Dana\\Desktop\\dev\\hooks-workshop\\node_modules\\grpc\\src\\node\\extension_binary\\node-v83-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\\Users\\Dana\\Desktop\\dev\\hooks-workshop\\node_modules\\grpc\\src\\node\\extension_binary\\node-v83-win32-x64-unknown" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
    npm ERR! gyp ERR! cwd C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc
    npm ERR! gyp ERR! node -v v14.17.3
    npm ERR! gyp ERR! node-gyp -v v7.1.2
    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 'C:\nodejs\node.exe C:\Users\Dana\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\src\node\extension_binary\node-v83-win32-x64-unknown --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
    npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:375:28)
    npm ERR! node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1055:16)
    npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
    npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19042
    npm ERR! node-pre-gyp ERR! command "C:\\nodejs\\node.exe" "C:\\Users\\Dana\\Desktop\\dev\\hooks-workshop\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
    npm ERR! node-pre-gyp ERR! cwd C:\Users\Dana\Desktop\dev\hooks-workshop\node_modules\grpc
    npm ERR! node-pre-gyp ERR! node -v v14.17.3
    npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.13.0
    npm ERR! node-pre-gyp ERR! not ok

  

标签: npm

解决方案


您尝试安装的版本grpc与您使用的 Node 版本不兼容。您应该升级到更新版本grpc来解决这个问题。

请注意,该grpc软件包已弃用。如果可以,我们建议您改用使用@grpc/grpc-js


推荐阅读