量角器调试器找不到模块

Protractor Debugger cannot find module

我正在 运行 我的测试中使用量角器和 async/await,并尝试使用调试器。正在输入 node --inspect-brk bin/protractor conf.js 比在 Chrome 中打开 "chrome://inspect/#devices"(显示 "bin/protractor file:/// inspect"),单击 "Inspect" 并在提示中出现以下错误:

Debugger listening on ws://127.0.0.1:9229/85c1f4a4-3048-4c73-b42f-61a5f078ba7e
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module 'C:\Users\harmatii\Protractor\calbar\bin\protractor'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
Waiting for the debugger to disconnect...

看起来问题出在 protractorconf.js 的路径中。 尝试提供 protractorconf.js.

的正确路径

应该是这样的:

node --inspect-brk node_modules/protractor/bin/protractor /users/harmatii/Protractor/conf.js