question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Strange error trying to run Jasmine specs

See original GitHub issue
callum:tool-test $ gulp test
[gulp] Using file /Users/madebymany/tool-test/gulpfile.js
[gulp] Working directory changed to /Users/madebymany/tool-test
[gulp] Running 'scripts'...
[gulp] Finished 'scripts' in 4.52 ms
[gulp] Running 'test'...
/Users/madebymany/tool-test/src/main.js
[gulp] Starting Karma server...

/Users/madebymany/tool-test/node_modules/gulp-karma/node_modules/karma/node_modules/di/lib/injector.js:9
      throw error('No provider for "' + name + '"!');
            ^
Error: No provider for "framework:jasmine"! (Resolving: framework:jasmine)
    at error (/Users/madebymany/tool-test/node_modules/gulp-karma/node_modules/karma/node_modules/di/lib/injector.js:22:68)
    at Object.parent.get (/Users/madebymany/tool-test/node_modules/gulp-karma/node_modules/karma/node_modules/di/lib/injector.js:9:13)
    at get (/Users/madebymany/tool-test/node_modules/gulp-karma/node_modules/karma/node_modules/di/lib/injector.js:54:19)
    at /Users/madebymany/tool-test/node_modules/gulp-karma/node_modules/karma/lib/server.js:29:14
    at Array.forEach (native)
    at start (/Users/madebymany/tool-test/node_modules/gulp-karma/node_modules/karma/lib/server.js:28:21)
    at invoke (/Users/madebymany/tool-test/node_modules/gulp-karma/node_modules/karma/node_modules/di/lib/injector.js:75:15)
    at Object.exports.start (/Users/madebymany/tool-test/node_modules/gulp-karma/node_modules/karma/lib/server.js:272:12)
    at Object.<anonymous> (/Users/madebymany/tool-test/node_modules/gulp-karma/lib/background.js:3:8)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3
[gulp] Finished 'test' in 566 ms

I have tried reinstalling Karma and associated modules. Explicitly installing karma-jasmine didn’t seem to work (http://stackoverflow.com/questions/19185548/no-provider-error-on-karma-serve-running-angularjs-phonecat-tutorial).

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:24 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
raphaelhudvoycommented, Apr 29, 2015

I had the same problem. Adding ‘karma-jasmine’, ‘karma-chrome-launcher’ in the plugins fixed it.

  plugins : [
        require('karma-webpack'),
        'karma-jasmine',
        'karma-chrome-launcher'
    ]
2reactions
munishmehta27commented, Dec 12, 2014

Yes removed global karma then installed karma-cli globally. thereafter i installed karma local to project and then runned karma.

  1. npm uninstall karma -g
  2. npm install karma-cli -g
  3. npm install karma --save-dev
  4. grunt karma test -v Still getting “Warning: No provider for “framework:jasmine”! (Resolving: framework:jasmine)”. Please help.

Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Underscore error when running karma + jasmine test
I have a strange error when running karma + jasmine tests over my js MarionetteJs app. ... This is just a dummy test...
Read more >
Angular / Jasmine Tip: Getting at the Real Error Message ...
So if you find yourself wondering about why you're getting that strange XMLHttpRequest error, try running your test suite without source maps.
Read more >
Frequently Asked Questions - Jasmine Documentation
The best Jasmine can do is associate the error with the spec or suite that was running when it happened. This is usually...
Read more >
jasmine an error was thrown in afterall - You.com
afterAll is called when all of the specs have been completed, but it your situation server is not running and as a result...
Read more >
Diagnosing Random Angular Test Failures - WalkingRiver.com
Background. Angular + Jasmine + Karma. I am using Angular 10 in this specific project, writing unit tests with Jasmine, and running them...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found