From the quickstart sb-admin-angular, I am trying to run the tests, but I get the error unable to init ocLazyLoad
. (This is a Windows7 machine.)
The command I use to run the tests is:
$ grunt test --force
I understand from this thread that I must make sure that the path to the ocLazyLoad script is added in karma.conf.js
.
files: [
'bower_components/angular/angular.js',
'bower_components/angular-mocks/angular-mocks.js',
...
'bower_components/oclazyload/dist/ocLazyLoad.min.js',
'app/scripts/**/*.js',
'test/mock/**/*.js',
'test/spec/**/*.js'
],
I have also tried using Bower to reinstall ocLacyLoad, as suggested in the aforementioned thread. I was given a choice of versions and selected the first option:
Unable to find a suitable version for oclazyload, please choose one:
1) oclazyload#~0.5.2 which resolved to 0.5.2 and is required by sb-admin
2) oclazyload#^1.0.9 which resolved to 1.0.9
What step am I missing or corrupting here, please?
I would update oclazyload in bower.json file to version 0.6.0 or higher. Some 0.5.x version introduced this bug and it is solved at 0.6.0 version on.
Current value on bower.json value of the example was 0.5.2 which you used, too.
References:
[1] https://github.com/ocombe/ocLazyLoad/issues/122 (issue in GitHub)
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