运行 config.js 时量角器退出,错误代码为 100

Protractor exited with error code 100 when run config.js

几天前,我的量角器工作正常。但是昨天当我尝试 运行 相同的测试时,我得到:

E/launcher - Error: Error: Cannot find module 'jasmine-reporters'
Require stack:
- D:\Repos\POS\config\config_c80_checkScreen.js
- C:\Users\ingridd\AppData\Roaming\npm\node_modules\protractor\built\configParser.js
- C:\Users\ingridd\AppData\Roaming\npm\node_modules\protractor\built\launcher.js
- C:\Users\ingridd\AppData\Roaming\npm\node_modules\protractor\built\cli.js
- C:\Users\ingridd\AppData\Roaming\npm\node_modules\protractor\bin\protractor
   at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
   at Function.Module._load (internal/modules/cjs/loader.js:686:27)
   at Module.require (internal/modules/cjs/loader.js:848:19)
   at require (internal/modules/cjs/helpers.js:74:18)
   at onPrepare (D:\Repos\POS\config\config_c80_checkScreen.js:62:28)
   at C:\Users\ingridd\AppData\Roaming\npm\node_modules\protractor\built\util.js:46:49
   at Function.promise (C:\Users\ingridd\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:682:9) 
   at Object.runFilenameOrFn_ (C:\Users\ingridd\AppData\Roaming\npm\node_modules\protractor\built\util.js:38:16)
   at C:\Users\ingridd\AppData\Roaming\npm\node_modules\protractor\built\runner.js:98:27
   at _fulfilled (C:\Users\ingridd\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:834:54)      
Closing report
[11:03:30] E/launcher - Process exited with error code 100

在我的项目文件夹中,我有 protractor-jasmine2-screenshot-reporter 文件夹,如您在屏幕截图中所见

jasmine2 folder

请查看环境变量所在的位置

env var

我尝试的最后一件事是更新网络驱动程序并安装最新的量角器。但我仍然遇到同样的错误。 任何建议表示赞赏。

错误 100 是 RUNNERS_FAILED_EXIT_CODE,这是因为出现意外错误。该错误看起来像您缺少 jasmine-reportersnpm install -S jasmine-reporters 应该修复它。