亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

puppeteer的使用問題???

puppeteer的使用問題???

汪汪一只貓 2018-11-13 11:30:19
在阿里云服務器上,系統是Debian8.9,安裝puppeteer是使用cnpm i puppeteer的命令安裝的,安裝也成功了,在進行測試的時候出現了問題,我的測試代碼如下:const puppeteer = require(‘puppeteer’);(async () => {let browser = await puppeteer.launch({executablePath: ‘./chromium/chrome.exe’,headless: false});const page = await browser.newPage();await page.goto(‘http://music.163.com/’);await page.screenshot({path: ‘music.png’});browser.close();})();運行后出現如下的錯誤:(node:23748) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to launch chrome! spawn ./chromium/chrome.exe ENOENTTROUBLESHOOTING: https://github.com/GoogleChro...(node:23748) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.請問一下有沒有碰到這樣的,怎么樣來解決呢???感謝?。?!
查看完整描述

1 回答

?
江戶川亂折騰

TA貢獻1851條經驗 獲得超5個贊

在里面try catch一下,應該是某處有問題

查看完整回答
反對 回復 2018-11-13
  • 1 回答
  • 0 關注
  • 625 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號