在阿里云服務(wù)器上,系統(tǒng)是Debian8.9,安裝puppeteer是使用cnpm i puppeteer的命令安裝的,安裝也成功了,在進行測試的時候出現(xiàn)了問題,我的測試代碼如下: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();})();運行后出現(xiàn)如下的錯誤:(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.請問一下有沒有碰到這樣的,怎么樣來解決呢???感謝?。?!
添加回答
舉報
0/150
提交
取消