当前位置:   article > 正文

npm ci报错_npm err! error: read econnreset npm err! at tlswra

npm err! error: read econnreset npm err! at tlswrap.onstreamread (node:inter

npm ERR! code 1
npm ERR! git dep preparation failed
npm ERR! command /usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js install --force --cache=/Users/ziren/.npm --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit --include=dev --include=peer --include=optional --no-package-lock-only --no-dry-run
npm ERR! npm WARN using --force Recommended protections disabled.
npm ERR! npm WARN deprecated @types/jest-diff@24.3.0: This is a stub types definition. jest-diff provides its own type definitions, so you do not need this installed.
npm ERR! npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm ERR! npm WARN deprecated request-promise-native@1.0.9: request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142
npm ERR! npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm ERR! npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm ERR! npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm ERR! npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm ERR! npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm ERR! npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm ERR! npm WARN deprecated rollup-plugin-babel@4.3.2: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
npm ERR! npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /Users/ziren/.npm/_cacache/tmp/git-cloneRuUVcP/node_modules/puppeteer
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c -- node install.js
npm ERR! npm ERR! ERROR: Failed to download Chromium r662092! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
npm ERR! npm ERR! Error: read ECONNRESET
npm ERR! npm ERR!     at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)
npm ERR! npm ERR!   -- ASYNC --
npm ERR! npm ERR!     at BrowserFetcher.<anonymous> (/Users/ziren/.npm/_cacache/tmp/git-cloneRuUVcP/node_modules/puppeteer/lib/helper.js:110:27)
npm ERR! npm ERR!     at Object.<anonymous> (/Users/ziren/.npm/_cacache/tmp/git-cloneRuUVcP/node_modules/puppeteer/install.js:64:16)
npm ERR! npm ERR!     at Module._compile (node:internal/modules/cjs/loader:1159:14)
npm ERR! npm ERR!     at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
npm ERR! npm ERR!     at Module.load (node:internal/modules/cjs/loader:1037:32)
npm ERR! npm ERR!     at Module._load (node:internal/modules/cjs/loader:878:12)
npm ERR! npm ERR!     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
npm ERR! npm ERR!     at node:internal/main/run_main_module:23:47 {
npm ERR! npm ERR!   errno: -54,
npm ERR! npm ERR!   code: 'ECONNRESET',
npm ERR! npm ERR!   syscall: 'read'
npm ERR! npm ERR! }
npm ERR! 
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR!     /Users/ziren/.npm/_logs/2024-01-03T05_59_33_321Z-debug-0.log

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/ziren/.npm/_logs/2024-01-03T05_55_57_101Z-debug-0.log

原因:安装 puppeteer失败,安装过程会下载Chromium。国内下载Chromium肯定失败的

根据提示,设置环境变量后正常

export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true

Mac系统

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/584444
推荐阅读
相关标签
  

闽ICP备14008679号