npm ERR! puppeteer@8.0.0 install: `node install.js`报错解决方案

npm ERR! puppeteer@8.0.0 install: node install.js报错解决方案

问题

$ npm i puppeteer

> puppeteer@8.0.0 install C:\Users\11244\node_modules\puppeteer
> node install.js

ERROR: Failed to set up Chromium r856583! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
Error: Client network socket disconnected before secure TLS connection was established
    at connResetException (internal/errors.js:607:14)
    at TLSSocket.onConnectEnd (_tls_wrap.js:1544:19)
    at TLSSocket.emit (events.js:327:22)
    at endReadableNT (internal/streams/readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  code: 'ECONNRESET',
  path: null,
  host: 'storage.googleapis.com',
  port: 443,
  localAddress: undefined
}
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\11244\package.json'
npm WARN 11244 No description
npm WARN 11244 No repository field.
npm WARN 11244 No README data
npm WARN 11244 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! puppeteer@8.0.0 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer@8.0.0 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!     C:\Users\11244\AppData\Roaming\npm-cache\_logs\2021-04-21T08_26_34_583Z-debug.log

解决方案

  • 使用梯子即可

安装成功

$ npm i puppeteer

> puppeteer@8.0.0 install C:\Users\11244\node_modules\puppeteer
> node install.js

Downloading Chromium r856583 - 164.6 Mb [=============] 100% 0.0s
Chromium (856583) downloaded to C:\Users\11244\node_modules\puppeteer\.local-chromium\win64-856583
npm WARN saveError ENOENT: no such file or directory, open 'C:\Users\11244\package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open 'C:\Users\11244\package.json'
npm WARN 11244 No description
npm WARN 11244 No repository field.
npm WARN 11244 No README data
npm WARN 11244 No license field.

+ puppeteer@8.0.0
added 54 packages from 73 contributors and audited 54 packages in 124.074s

8 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值