每当我删除node_modules控制器并运行npm install时,都会遇到此错误。我已经修复了两次该错误,
第一次:我卸载了Python 3.6,然后安装了Python 2.7。我设置路径。之后,npm install工作正常。
第二次:我删除了Visual Studio 2013,并在C ++环境下安装了Visual Studio 2017。之后,npm install工作正常。
我再次遇到此错误,现在不知道该怎么办。我尝试过的事情- 1)npm缓存清理--force 2)更新npm 3)npm审核修复程序
以下是错误
> grpc@1.13.1 install F:\Project\ovik\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 grpc@1.13.1 and node@8.
11.4 (node-v57 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error unable to verify the first certificate
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: unable to verify the first certificate
gyp ERR! stack at TLSSocket.<anonymous> (_tls_wrap.js:1105:38)
gyp ERR! stack at emitNone (events.js:106:13)
gyp ERR! stack at TLSSocket.emit (events.js:208:7)
gyp ERR! stack at TLSSocket._finishInit (_tls_wrap.js:639:8)
gyp ERR! stack at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:469:38)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Sherry\\AppDa
ta\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "
configure" "--fallback-to-build" "--library=static_library" "--module=F:\\Projec
t\\ovik\\node_modules\\grpc\\src\\node\\extension_binary\\node-v57-win32-x64-unk
nown\\grpc_node.node" "--module_name=grpc_node" "--module_path=F:\\Project\\ovik
\\node_modules\\grpc\\src\\node\\extension_binary\\node-v57-win32-x64-unknown" "
--napi_version=3" "--node_abi_napi=napi" "--python=python2.7" "--msvs_version=20
17"
gyp ERR! cwd F:\Project\ovik\node_modules\grpc
gyp ERR! node -v v8.11.4
gyp ERR! node-gyp -v v3.8.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.e
xe C:\Users\Sherry\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bi
n\node-gyp.js configure --fallback-to-build --library=static_library --module=F:
\Project\ovik\node_modules\grpc\src\node\extension_binary\node-v57-win32-x64-unk
nown\grpc_node.node --module_name=grpc_node --module_path=F:\Project\ovik\node_m
odules\grpc\src\node\extension_binary\node-v57-win32-x64-unknown --napi_version=
3 --node_abi_napi=napi --python=python2.7 --msvs_version=2017' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (F:\Project\ovik\node_mo
dules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:126:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:214:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/chi
ld_process.js:209:5)
node-pre-gyp ERR! System Windows_NT 6.1.7601
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "F:\\Project\\ov
ik\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install"
"--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd F:\Project\ovik\node_modules\grpc
node-pre-gyp ERR! node -v v8.11.4
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\Sherry\AppData\Roam
ing\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallb
ack-to-build --library=static_library --module=F:\Project\ovik\node_modules\grpc
\src\node\extension_binary\node-v57-win32-x64-unknown\grpc_node.node --module_na
me=grpc_node --module_path=F:\Project\ovik\node_modules\grpc\src\node\extension_
binary\node-v57-win32-x64-unknown --napi_version=3 --node_abi_napi=napi --python
=python2.7 --msvs_version=2017' (1)
npm WARN babel-loader@7.1.5 requires a peer of webpack@2 || 3 || 4 but none is i
nstalled. You must install peer dependencies yourself.
npm WARN eslint-plugin-react-native@3.2.1 requires a peer of eslint@^3.17.0 || ^
4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native@0.55.4 requires a peer of react@16.3.1 but none is install
ed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fse
vents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@
1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.13.1 install: `node-pre-gyp install --fallback-to-build --librar
y=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@1.13.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional log
ging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Sherry\AppData\Roaming\npm-cache\_logs\2018-09-03T13_18_02
_542Z-debug.log