npm install 报错
运行:npm install 报错:
`
$ npm install
chromedriver@2.27.2 install D:\OLP\LH_SourceCode\YZ\code\lanhai-origin\mall\node_modules\chromedriver
node install.js
Downloading https://chromedriver.storage.googleapis.com/2.27/chromedriver_win32.zip
Saving to C:\Users\Martin\AppData\Local\Temp\chromedriver\chromedriver_win32.zip
events.js:353
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at TLSWrap.onStreamRead (internal/stream_base_commons.js:209:20)
Emitted 'error' event on ClientRequest instance at:
at TLSSocket.socketErrorListener (_http_client.js:475:9)
at TLSSocket.emit (events.js:376:20)
at emitErrorNT (internal/streams/destroy.js:106:8)
at emitErrorCloseNT (internal/streams/destroy.js:74:3)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
errno: -4077,
code: 'ECONNRESET',
syscall: 'read'
}
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\watchpack\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! chromedriver@2.27.2 install: node install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the chromedriver@2.27.2 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! D:\software\nodejs\node_cache_logs\2021-07-15T14_47_18_860Z-debug.log
`
解决办法:
`
npm install --ignore-scripts
再来一个提示:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\watchpack\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
audited 1826 packages in 9.305s
53 packages are looking for funding
run npm fund for details
found 124 vulnerabilities (56 low, 51 moderate, 16 high, 1 critical)
run npm audit fix to fix them, or npm audit for details
运行命令:npm audit fix --force`

浙公网安备 33010602011771号