我在 Debian 8.7.1 上。
我想使用 Google Chrome Puppeteer。
我有一个名为 script.js 的文件,我按照 Puppeteer 文档中的建议放置了获取屏幕截图的命令。
为了运行 JavaScript 文件,我运行以下命令:
nodejs script.js
但它有一些错误:
(node:929) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): AssertionError [ERR_ASSERTION]: Chromium revision is not downloaded. Run "npm install"
(node:929) [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.
nodejs -v
是v8.4.0
和npm -v
是5.3.0
。
请帮我解决这个问题。