节点UnhandledPromiseRejectionWarning:错误:生成EPERM

时间:2019-09-13 11:24:42

标签: javascript node.js puppeteer

我正在尝试在Windows 10计算机上运行一些简单的Puppeteer测试。

我正在运行Java 8,Node v11.12.0和ECMAScript6。

我提取的示例来自此仓库: https://github.com/checkly/puppeteer-examples

这提供了以下package.json:

{
 "name": "puppeteer-examples",
  "version": "1.0.0",
  "description": "",
  "dependencies": {
    "puppeteer": "^1.20.0"
  },
  "devDependencies": {
    "eslint-plugin-mocha": "^4.11.0",
    "file-system": "^2.2.2",
    "jest": "^21.2.1",
    "js-comments": "^0.5.4",
    "lodash": "^4.17.15"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/checkly/puppeteer- 
   examples.git"
   },
  "author": "Tim Nolet",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/checkly/puppeteer- 
  examples/issues"
  },
     "homepage": "https://github.com/checkly/puppeteer- 
      examples#readme"
}

我已经运行了npm install

在我尝试运行的任何示例中,都会产生以下错误:

C:\functional_tests\puppeteer-examples\1. basics>node forms.js
(node:5708) UnhandledPromiseRejectionWarning: Error: spawn EPERM
    at ChildProcess.spawn (internal/child_process.js:372:11)
    at Object.spawn (child_process.js:559:9)
    at Launcher.launch (C:\functional_tests\puppeteer-examples\node_modules\puppeteer\lib\Launcher.js:132:40)
(node:5708) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by r
ejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:5708) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js proce
ss with a non-zero exit code.

我是Javascript新手!

关于最受欢迎的事情的任何线索

谢谢

1 个答案:

答案 0 :(得分:0)

您需要有 bit9 密钥才能使代码运行成功。