...
got a problem with a problem setup.
I use yeoman and create my project with
yo gup-angular
After setup I start the unit testing with
gulp test
But it fails with:
PS P:\projects\test-logbook> gulp test
[15:15:14] Using gulpfile P:\projects\mydisk-logbook\gulpfile.js
[15:15:14] Starting 'scripts'...
[15:15:15] all files 14.08 kB
[15:15:15] Finished 'scripts' after 840 ms
[15:15:15] Starting 'test'...
28 09 2017 15:15:15.601:WARN [proxy]: proxy "\base\src\assets\" normalized to "\base\src\assets\/"
28 09 2017 15:15:15.665:WARN [watcher]: Pattern "P:/projects/mydisk-logbook/src/**/*.mock.js" does not match any file.
PhantomJS 1.9.8 (Windows 8 0.0.0) ERROR
TypeError: 'undefined' is not a function (near '....info({ angularVersion: '...')
at P:/projects/mydisk-logbook/bower_components/angular-animate/angular-animate.js:4138
[15:15:18] 'test' errored after 2.69 s
[15:15:18] Error: Failed 1 tests.
at P:\projects\mydisk-logbook\gulp\unit-tests.js:41:22
at removeAllListeners (P:\projects\mydisk-logbook\node_modules\karma\lib\server.js:336:7)
at Server.<anonymous> (P:\projects\mydisk-logbook\node_modules\karma\lib\server.js:347:9)
at Server.g (events.js:292:16)
at emitNone (events.js:91:20)
at Server.emit (events.js:185:7)
at emitCloseNT (net.js:1554:8)
at _combinedTickCallback (internal/process/next_tick.js:77:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
It failed in bower_components/angular-animate/angular-animate.js, line 4138.
How to solve that error? What is my fail?
Regards n00n
ps: Bower Update gets me this information
Please note that,
angular-aria#1.5.11, angular-cookies#1.5.11, angular-messages#1.5.11, angular-mocks#1.5.11, angular-resource#1.5.11, angular-sanitize#1.5.11, angular-touch#1.5.11 depends on angular#1.5.11 which resolved to angular#1.5.11
mydisk-logbook depends on angular#~1.5.3 which resolved to angular#1.5.11
angular-material#1.0.9 depends on angular#^1.4.8 which resolved to angular#1.5.11
angular-ui-router#0.2.18 depends on angular#^1.0.8 which resolved to angular#1.5.11
angular-toastr#1.5.0 depends on angular#>=1.3.0 which resolved to angular#1.5.11
angular-animate#1.6.6 depends on angular#1.6.6 which resolved to angular#1.6.6
Resort to using angular#~1.5.3 which resolved to angular#1.5.11
Code incompatibilities may occur.
bower jquery extra-resolution Unnecessary resolution: jquery#~2.1.4
Those kind of issues are usually due to versions mismatch between angular libraries. Are all of Angular's libs locked to the same version?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With