當運行我的業力測試,我得到了詹金斯構建這個錯誤。所以要清楚,這個工作在當地罰款和我所有的測試都通過了,但是當我運行詹金斯盒完全相同的代碼,我得到的錯誤:'undefined'不是一個函數(評估'_.contains)業力測試
PhantomJS 1.9.8 (Linux 0.0.0) VisitDataSpeC#emailExists should return true if email is already FAILED
TypeError: 'undefined' is not a function (evaluating '_.contains(visitEmails,email)')
at /home/server/jenkins/workspace/Reception UI Build/src/app/model/VisitData.js:9
at /home/server/jenkins/workspace/Reception UI Build/test/app/model/VisitData.spec.js:208
我聞phantomjs的越野車版本。服務器上的版本是1.9.0。我將本地版本降級到同一版本,嘗試在本地重現問題,但這並未發生。
我已經試圖包括下劃線和lodash,並沒有任何圖書館的工作。
我得到了一個測試同樣的錯誤在那裏Restangular嘗試使用下劃線以及:
PhantomJS 1.9.8 (Linux 0.0.0) EmailVisitControllerSpeC#signIn should call VisitService to add a new service with scope data FAILED
TypeError: 'undefined' is not a function (evaluating '_.contains(safeMethods, operation.toLowerCase())')
at /home/server/jenkins/workspace/Reception UI Build/bower_components/restangular/dist/restangular.js:21
at elemFunction (/home/server/jenkins/workspace/Reception UI Build/bower_components/restangular/dist/restangular.js:1217)
at wrapper (/home/server/jenkins/workspace/Reception UI Build/bower_components/lodash/lodash.js:3949)
at postFunction (/home/server/jenkins/workspace/Reception UI Build/bower_components/restangular/dist/restangular.js:1246)
at apply (/home/server/jenkins/workspace/Reception UI Build/bower_components/lodash/lodash.js:402)
at wrapper (/home/server/jenkins/workspace/Reception UI Build/bower_components/lodash/lodash.js:4254)
at /home/server/jenkins/workspace/Reception UI Build/src/app/rest/VisitService.js:9
at invoke (/home/server/jenkins/workspace/Reception UI Build/node_modules/karma-sinon-chai/node_modules/sinon/pkg/sinon.js:2583)
at addVisit (:1)
at /home/server/jenkins/workspace/Reception UI Build/src/app/visits/EmailVisitController.js:9
at /home/server/jenkins/workspace/Reception UI Build/test/app/visits/EmailVisitController.spec.js:91
採用了棱角分明1.4.2,角嘲笑1.4.2,2.3.4摩卡和現在,下劃線1.8.3或lodash 3.10.1(試用)。
順便說一句,這可能是相關的:我有這四對詹金斯建設時:
npm WARN install Couldn't install optional dependency: Unsupported
也許這不是解決某些依賴關係,可惜我看不到哪些。使用npm 3.3.2。
有沒有人有任何關於我在這裏失蹤的想法?任何已知的不兼容版本?
我在這裏有同樣的問題 - 你找到解決方案嗎? – mgibas