Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No provider for framework jasmine

Tags:

karma-runner

when i try to start karma i am getting error below:

C:\*>karma start karma.conf.js

C:\Users\*\AppData\Roaming\npm\node_modules\karma\node_modules\di\lib\injector.js:9
      throw error('No provider for "' + name + '"!');
            ^
Error: No provider for "framework:jasmine"! (Resolving: framework:requirejs)
    at error (C:\Users\*\AppData\Roaming\npm\node_modules\karma\node_modules\di\lib\injector.js:22:
    at Object.parent.get (C:\Users\*\AppData\Roaming\npm\node_modules\karma\node_modules\di\lib\inj
    at get (C:\Users\*\AppData\Roaming\npm\node_modules\karma\node_modules\di\lib\injector.js:54:19
    at C:\Users\*\AppData\Roaming\npm\node_modules\karma\lib\server.js:31:14
    at Array.forEach (native)
    at start (C:\Users\XYZ\AppData\Roaming\npm\node_modules\karma\lib\server.js:30:21)
    at invoke (C:\Users\XYZ\AppData\Roaming\npm\node_modules\karma\node_modules\di\lib\injector.js:75
    at Object.exports.start (C:\Users\XYZ\AppData\Roaming\npm\node_modules\karma\lib\server.js:314:12
    at Object.exports.run (C:\Users\XYZ\AppData\Roaming\npm\node_modules\karma\lib\cli.js:229:25)
    at requireCliAndRun (C:\Users\*\AppData\Roaming\npm\node_modules\karma-cli\bin\karma:24:16)

I already check if i have jasmine installed :

C:\*>npm jasmine --version
1.4.28

and Karma:

C:\*>karma --version
Karma version: 0.12.31

and followed few more tutorials but can't get out of this error, can someone please help me?

like image 521
Andurit Avatar asked Jan 26 '15 14:01

Andurit


1 Answers

Looks that you need install the dependency to jasmine. Try :

npm install karma-jasmine

Also you need to add the config karma-jasmine in your array of plugins inside your config file:

    // list of karma plugins
    plugins: [
        'karma-chrome-launcher',
        'karma-firefox-launcher',
        'karma-phantomjs-launcher',
        'karma-requirejs',
        'karma-jasmine'
    ]
like image 72
Rubén Fanjul Estrada Avatar answered Nov 15 '22 07:11

Rubén Fanjul Estrada