我对木偶师有意见。我无法在我的debian 8.7.1上安装它。以下是步骤:
1.安装chrome:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt-get -f install
sudo dpkg -i google-chrome-stable_current_amd64.deb2.安装nodejs & puppeteer:
apt-get install curl
curl -sL https://deb.nodesource.com/setup_8.x | bash -
sudo apt-get install -y nodejs
npm i puppeteer当我运行npm i puppeteer时,错误是:
> puppeteer@0.11.0 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! puppeteer@0.11.0 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the puppeteer@0.11.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! /root/.npm/_logs/2017-10-04T12_32_37_607Z-debug.log我运行命令npm config set PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true跳过下载,但它还想下载铬。
有什么办法来解决这个问题吗?
发布于 2019-04-22 16:30:08
尝试下面的选项;
1) npm config set puppeteer_skip_chromium_download true
2) Add puppeteer_skip_chromium_download=true to .npmrc file where the package.json location之后运行sudo npm install --unsafe-perm=true --allow-root
参考文献;
https://github.com/GoogleChrome/puppeteer/issues/2270
https://medium.com/forcit/seo-for-single-page-applications-8543619e1d0c发布于 2019-11-25 15:21:12
升级您的木偶剧版本(可选)
npm set strict-ssl false
npm config set puppeteer_skip_chromium_download true又是npm install。
发布于 2019-02-01 01:51:28
尝试sudo npm install puppeteer --unsafe-perm=true
https://stackoverflow.com/questions/46565328
复制相似问题