当我尝试跑步时ng e2e
或直接protractor
命令我收到此错误:
[14:39:00] I/update - chromedriver: chromedriver_2.28 up to date
[14:39:04] I/launcher - Running 1 instances of WebDriver
[14:39:04] I/direct - Using ChromeDriver directly...
[14:39:44] E/launcher - Error: TypeError: SpecReporter is not a constructor
at onPrepare (/home/younes/repo/cip_front/protractor.conf.js:30:34)
at q_1.Promise (/home/younes/repo/cip_front/node_modules/protractor/lib/util.ts:48:39)
at Function.promise (/home/younes/repo/cip_front/node_modules/q/q.js:682:9)
at Object.runFilenameOrFn_ (/home/younes/repo/cip_front/node_modules/protractor/lib/util.ts:39:10)
at plugins_.onPrepare.then (/home/younes/repo/cip_front/node_modules/protractor/lib/runner.ts:103:21)
at _fulfilled (/home/younes/repo/cip_front/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/home/younes/repo/cip_front/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/home/younes/repo/cip_front/node_modules/q/q.js:796:13)
at /home/younes/repo/cip_front/node_modules/q/q.js:556:49
at runSingle (/home/younes/repo/cip_front/node_modules/q/q.js:137:13)
at flush (/home/younes/repo/cip_front/node_modules/q/q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
[14:39:44] E/launcher - Process exited with error code 100
这是因为 Jasmine 发生了重大变化。将量角器配置文件更改为:
var SpecReporter = require('jasmine-spec-reporter').SpecReporter;
代替:
var SpecReporter = require('jasmine-spec-reporter');
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)