安装包时报错:

Command: node install.mjs
Arguments:
Directory: D:\gitee\huyunan\reace-project\react\compiler\node_modules\puppeteer
Output:
**INFO** Skipping Firefox download as instructed.
Error: ERROR: Failed to set up chrome v135.0.7049.114! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
    at downloadBrowser (file:///D:/gitee/huyunan/reace-project/react/compiler/node_modules/puppeteer/lib/esm/puppeteer/node/install.js:26:15)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Promise.all (index 0)
    at async downloadBrowsers (file:///D:/gitee/huyunan/reace-project/react/compiler/node_modules/puppeteer/lib/esm/puppeteer/node/install.js:84:9) {
  [cause]: Error: read ECONNRESET
      at TLSWrap.onStreamRead (node:internal/stream_base_commons:218:20) {
    errno: -4077,
    code: 'ECONNRESET',
    syscall: 'read'

设置临时环境变量再安装就好使了。

set PUPPETEER_SKIP_DOWNLOAD='true'

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐