2016-05-24 52 views
1

在我Jhispter 3.2.0應用(springboot + angularjs)當我運行誤差PhantomJS當構建Jhispter 3.2應用

mvn package -Pprod -Dmaven.test.skip=false

我與PhantomJS測試以下錯誤:

[INFO] -------------------------------------- 
24-mai-2016 10:49:06 [INFO]   GULP TEST --NO-COLOR 
24-mai-2016 10:49:06 [INFO] -------------------------------------- 
24-mai-2016 10:49:12 [10:49:12] Using gulpfile /home/bamboo-home/xml-data/build-dir/BAC2-BB-JOB1/gulpfile.js 
24-mai-2016 10:49:12 [10:49:12] Finished 'wiredep:test' after 160 ms 
24-mai-2016 10:49:12 [10:49:12] Starting 'test'... 
24-mai-2016 10:49:16 24 05 2016 10:49:16.033:INFO [karma]: Karma v0.13.22 server started at http://localhost:9876/ 
24-mai-2016 10:49:16 24 05 2016 10:49:16.038:INFO [launcher]: Starting browser PhantomJS 
24-mai-2016 10:49:17 24 05 2016 10:49:17.225:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket /#39xT4ekwBtS29U-sAAAA with id 54555652 
24-mai-2016 10:49:17 PhantomJS 2.1.1 (Linux 0.0.0) ERROR 
24-mai-2016 10:49:17  TypeError: undefined is not a function (evaluating 'angular.module('backTrocApp').component('jhiAlertError',jhiAlertError)') 
24-mai-2016 10:49:17  at /home/bamboo-home/xml-data/build-dir/BAC2-BB-JOB1/src/main/webapp/app/components/alert/alert-error.directive.js:9 
24-mai-2016 10:49:17  
24-mai-2016 10:49:17 PhantomJS 2.1.1 (Linux 0.0.0): Executed 0 of 0 ERROR (0.47 secs/0 secs) 
24-mai-2016 10:49:17  
24-mai-2016 10:49:17 PhantomJS 2.1.1 (Linux 0.0.0) ERROR 
24-mai-2016 10:49:17  TypeError: undefined is not a function (evaluating 'angular.module('backTrocApp').component('jhiAlert',jhiAlert)') 
24-mai-2016 10:49:17  at /home/bamboo-home/xml-data/build-dir/BAC2-BB-JOB1/src/main/webapp/app/components/alert/alert.directive.js:9 
    24-mai-2016 10:49:17 
24-mai-2016 10:49:17 PhantomJS 2.1.1 (Linux 0.0.0): Executed 0 of 0 ERROR (0.475 secs/0 secs) 
24-mai-2016 10:49:17 Missing error handler on `socket`. 
24-mai-2016 10:49:17 TypeError: Cannot read property '54555652' of null 
24-mai-2016 10:49:17  at onBrowserComplete (/home/bamboo-home/xml-JOB1/node_modules/orchestrator/index.js:264:8) 
24-mai-2016 10:49:17  at /home/bamboo-home/xml-data/build-dir/BAC2-BB-JOB1/node_modules/orchestrator/index.js:275:23 
24-mai-2016 10:49:17  at finish (/home/bamboo-home/xml-data/build-dir/BAC2-BB-JOB1/node_modules/orchestrator/lib/runTask.js:21:8) 
24-mai-2016 10:49:17  at Server.<anonymous> (/home/bamboo-home/xml-data/build-dir/BAC2-BB-JOB1/node_modules/karma/lib/server.js:347:9) 
24-mai-2016 10:49:17  at Server.g (events.js:260:16) 
24-mai-2016 10:49:17  at emitNone (events.js:72:20) 
24-mai-2016 10:49:17  at Server.emit (events.js:166:7) 
24-mai-2016 10:49:17  at emitCloseNT (net.js:1521:8) 
24-mai-2016 10:53:17  var suite = suites[browser.id]; 
24-mai-2016 10:53:17 TypeError: Cannot read property '54555652' of null 
24-mai-2016 10:53:17 24 05 2016 10:53:17.782:WARN [PhantomJS 2.1.1 (Linux 0.0.0)]: Disconnected (1 times), because no message in 240000 ms. 
24-mai-2016 10:53:17 [INFO] BUILD FAILURE 

感謝您的幫助

+0

您是否正在運行節點LTS版本,正如我們在我們的文檔中推薦的那樣? 'node -v'打印什麼? –

+0

我正在運行v4.4.2。 – Alexis

回答

0

請看這個jhipster issue

正如您所說的,您正在使用Jhipster v 3.1.0,並在3.2.0中添加了該功能,因此請嘗試更新您的應用程序並重試。

此致敬禮。

0

最後我找到原因,測試運行在角1.4併產生錯誤。

我不記得了,但對於角UI樹插件我在bower.json改變角度至1.2.0,而不是1.5.0

"resolutions": { 
"angular": ">1.2.0" 
} 

所有工作(相同的角-th-tree),thx尋求幫助