Angular 角度业力警告[web服务器]:404运行测试时

Angular 角度业力警告[web服务器]:404运行测试时,angular,gulp,karma-runner,karma-jasmine,karma-coverage,Angular,Gulp,Karma Runner,Karma Jasmine,Karma Coverage,我一直在想方设法为angular2、sass和ng2 bootstrap建立一个基础项目,这个项目基于angular2种子项目,您可以在这里找到整个代码基础:对于开发和产品发布,一切都按照预期进行了构建。但是,每当我尝试运行uni和e2e测试时,总是会出现以下错误: START: 18 05 2016 12:49:29.095:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/ 18 05 2016 12:4

我一直在想方设法为angular2、sass和ng2 bootstrap建立一个基础项目,这个项目基于angular2种子项目,您可以在这里找到整个代码基础:对于开发和产品发布,一切都按照预期进行了构建。但是,每当我尝试运行uni和e2e测试时,总是会出现以下错误:

START: 18 05 2016 12:49:29.095:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/ 18 05 2016 12:49:29.100:INFO [launcher]: Starting browser PhantomJS 18 05 2016 12:49:29.112:INFO [launcher]: Starting browser Chrome 18 05 2016 12:49:29.756:INFO [PhantomJS 2.1.1 (Mac OS X 0.0.0)]: Connected on socket /#87aZKElcLH5MAZgxAAAA with id 21686761 18 05 2016 12:49:29.910:INFO [Chrome 50.0.2661 (Mac OS X 10.11.5)]: Connected on socket /#tFoYBsOvsGJ0dDEGAAAB with id 7030871 18 05 2016 12:49:31.062:WARN [web-server]: 404: /app/app.component.html NameList Service ✔ should return the list of names 18 05 2016 12:49:31.160:WARN [web-server]: 404: /app/app.component.html App component ✖ should build without a problem Finished in 0.158 secs / 0.136 secs SUMMARY: ✔ 2 tests completed ✖ 2 tests failed FAILED TESTS: App component ✖ should build without a problem PhantomJS 2.1.1 (Mac OS X 0.0.0) Chrome 50.0.2661 (Mac OS X 10.11.5) Failed: Uncaught (in promise): Failed to load app/app.component.html at ZoneDelegate.invoke (/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/zone.js/dist/zone.js:323:29) at Zone.run (/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/zone.js/dist/zone.js:216:44) at /Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/zone.js/dist/zone.js:571:58 at ZoneDelegate.invokeTask (/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/zone.js/dist/zone.js:356:38) at Zone.runTask (/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/zone.js/dist/zone.js:256:48) at drainMicroTaskQueue (/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/zone.js/dist/zone.js:474:36) at F (/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/systemjs/dist/system-polyfills.js:4:7484) at H (/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/systemjs/dist/system-polyfills.js:4:7116) at q.when (/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/systemjs/dist/system-polyfills.js:4:10790) at T.run (/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/systemjs/dist/system-polyfills.js:4:11899) at t._drain (/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/systemjs/dist/system-polyfills.js:4:1744) at drain (/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/systemjs/dist/system-polyfills.js:4:1398) at MutationObserver.e (/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/systemjs/dist/system-polyfills.js:4:3319) 开始: 18 05 2016 12:49:29.095:信息[业力]:业力v0.13.22服务器在启动http://localhost:9876/ 18 05 2016 12:49:29.100:信息[启动器]:启动浏览器PhantomJS 18 05 2016 12:49:29.112:信息[启动器]:启动浏览器Chrome 18 05 2016 12:49:29.756:信息[PhantomJS 2.1.1(Mac OS X 0.0.0)]:连接到插座上,id为21686761 18 05 2016 12:49:29.910:信息[Chrome 50.0.2661(Mac OS X 10.11.5)]:连接在插座上,id为7030871 18 05 2016 12:49:31.062:警告[web服务器]:404:/app/app.component.html 名单服务 ✔ 应该返回姓名列表 18 05 2016 12:49:31.160:警告[网络服务器]:404:/app/app.component.html 应用程序组件 ✖ 应该毫无问题地建造 在0.158秒/0.136秒内完成 总结: ✔ 完成2项测试 ✖ 2次测试失败 失败的测试: 应用程序组件 ✖ 应该毫无问题地建造 PhantomJS 2.1.1(Mac OS X 0.0.0) Chrome 50.0.2661(Mac OS X 10.11.5) 失败:未捕获(承诺中):加载app/app.component.html失败 在ZoneDelegate.invoke(/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/zone.js/dist/zone.js:323:29) 在Zone.run(/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/Zone.js/dist/Zone.js:216:44) at/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/zone.js/dist/zone.js:571:58 在ZoneDelegate.invokeTask(/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/zone.js/dist/zone.js:356:38) 位于Zone.runTask(/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/Zone.js/dist/Zone.js:256:48) 在drainMicroTaskQueue(/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/zone.js/dist/zone.js:474:36) 在F(/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/systemjs/dist/system polyfills.js:4:7484) 在H(/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/systemjs/dist/system polyfills.js:4:7116) 在q.when(/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/systemjs/dist/system polyfills.js:4:10790) 运行时(/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/systemjs/dist/system polyfills.js:4:11899) 在t._排水口(/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/systemjs/dist/system polyfills.js:4:1744) 排水口(/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/systemjs/dist/system polyfills.js:4:1398) 在MutationObserver.e(/Users/omar/Development/public/angular-seed-sass-ng2-bootstrap/node_modules/systemjs/dist/system polyfills.js:4:3319)
欢迎提供任何帮助。

解决方案是使用以下参数通过gulp-inline-ng2-template传递build.js.test结果:

{ useRelativePaths: false, }; { userelativepath:false, };
解决方案是使用以下参数通过gulp-inline-ng2-template将build.js.测试结果导入管道:

{ useRelativePaths: false, }; { userelativepath:false, };