我有木偶人的问题。我无法在我的debian 8.7.1上安装它。 这些步骤如下:傀儡人安装有错误
1.安装Chrome浏览器:
- wget的https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- 须藤dpkg -i来谷歌铬stable_current_amd64.deb
- sudo易于得到-f安装
sudo dpkg -i google-chrome-stable_current_amd64.deb
- install nod EJS &操纵木偶:
- 易于得到安装卷曲
- 卷曲-SL https://deb.nodesource.com/setup_8.x |庆典 -
- 命令和apt-get安装-y的NodeJS
- NPM我操纵木偶
当我运行npm i puppeteer
,错误是:
> [email protected] install /root/node_modules/puppeteer
> node install.js
ERROR: Failed to download Chromium r499413! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.
Error: Download failed: server returned code 403. URL: https://storage.googleapis.com/chromium-browser-snapshots/Linux_x64/499413 /chrome-linux.zip
at ClientRequest.https.get.response (/root/node_modules/puppeteer/utils/ChromiumDownloader.js:195:21)
at Object.onceWrapper (events.js:316:30)
at emitOne (events.js:115:13)
at ClientRequest.emit (events.js:210:7)
at HTTPParser.parserOnIncomingClient (_http_client.js:565:21)
at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)
at TLSSocket.socketOnData (_http_client.js:454:20)
at emitOne (events.js:115:13)
at TLSSocket.emit (events.js:210:7)
at addChunk (_stream_readable.js:266:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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! /root/.npm/_logs/2017-10-04T12_32_37_607Z-debug.log
我运行命令npm config set PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
跳过下载,但它想要下载铬。
任何想法来解决这个问题?
因此Chromium下载失败?如果您尝试单独安装,该怎么办? – elena
感谢您的回复。我试着安装它。 (节点:2156)UnhandledPromiseRejectionWarning:未处理的承诺拒绝(拒绝ID:2):错误:产生EACCES (节点:2156)[DEP0018]弃用警告:未处理的承诺拒绝已被弃用。将来,未处理的承诺拒绝将使用非零退出代码终止Node.js进程。# –
好吧,那很好!这意味着你的一些木偶函数调用失败了。尝试删除其中的一些/选择正确的选择器,看看它是否工作。 – elena