无法安装Puppeteer
我已经写了命令
npm i --location=global puppeteer
来安装木偶。写作
npm install -g puppeteer
还会产生相同的错误:
C:\windows\system32>npm install -g puppeteer
npm ERR! code 1
npm ERR! path C:\Users\NITU PANDEL\AppData\Roaming\npm\node_modules\puppeteer
npm ERR! command failed
npm ERR! command C:\windows\system32\cmd.exe /d /s /c C:\Users\NITUPA~1\AppData\Local\Temp\install6572787965.cmd
npm ERR! ERROR: Failed to set up Chromium r1011831! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
npm ERR! Error: getaddrinfo ENOTFOUND storage.googleapis.com
npm ERR! at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26) {
npm ERR! errno: -3008,
npm ERR! code: 'ENOTFOUND',
npm ERR! syscall: 'getaddrinfo',
npm ERR! hostname: 'storage.googleapis.com'
npm ERR! }
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\NITU PANDEL\AppData\Local\npm-cache\_logs\2022-07-08T11_02_45_016Z-debug-0.log
起初它成功安装并能够运行代码,但是一天之后,它开始产生上述错误。
我尝试了Google上可用的所有内容。
I have written the command
npm i --location=global puppeteer
to install puppeteer. writing
npm install -g puppeteer
also produce the same error:
C:\windows\system32>npm install -g puppeteer
npm ERR! code 1
npm ERR! path C:\Users\NITU PANDEL\AppData\Roaming\npm\node_modules\puppeteer
npm ERR! command failed
npm ERR! command C:\windows\system32\cmd.exe /d /s /c C:\Users\NITUPA~1\AppData\Local\Temp\install6572787965.cmd
npm ERR! ERROR: Failed to set up Chromium r1011831! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
npm ERR! Error: getaddrinfo ENOTFOUND storage.googleapis.com
npm ERR! at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:71:26) {
npm ERR! errno: -3008,
npm ERR! code: 'ENOTFOUND',
npm ERR! syscall: 'getaddrinfo',
npm ERR! hostname: 'storage.googleapis.com'
npm ERR! }
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\NITU PANDEL\AppData\Local\npm-cache\_logs\2022-07-08T11_02_45_016Z-debug-0.log
At first it successfully got installed and was able to run the code, but after a day it started to produce the above errors.
I tried everything available on Google.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论