0

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

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 文件夹,如您在屏幕截图中所见

茉莉花2文件夹

请查看 ENV var 的位置

环境变量

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

4

1 回答 1

0

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

于 2020-11-29T02:07:25.037 回答