Karma "Provider Error" serves to launch angularjs phonecat tutorial

I found and tried many solutions offered here and elsewhere: redefine updating the version of the karma node and npm - change the boot order in the configuration file .... but so far nothing works. Is the problem running the angular tutorial via Apache?

Starting a karma server ( http://karma-runner.imtqy.com )

/usr/local/lib/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 (/usr/local/lib/node_modules/karma/node_modules/di/lib/injector.js:22:68) at Object.parent.get (/usr/local/lib/node_modules/karma/node_modules/di/lib/injector.js:9:13) at get (/usr/local/lib/node_modules/karma/node_modules/di/lib/injector.js:54:19) at /usr/local/lib/node_modules/karma/lib/server.js:28:14 at Array.forEach (native) at start (/usr/local/lib/node_modules/karma/lib/server.js:27:21) at invoke (/usr/local/lib/node_modules/karma/node_modules/di/lib/injector.js:75:15) at Object.exports.start (/usr/local/lib/node_modules/karma/lib/server.js:204:12) at Object.<anonymous> (/usr/local/lib/node_modules/karma/bin/karma /usr/local/lib/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 (/usr/local/lib/node_modules/karma/node_modules/di/lib/injector.js:22:68) at Object.parent.get (/usr/local/lib/node_modules/karma/node_modules/di/lib/injector.js:9:13) at get (/usr/local/lib/node_modules/karma/node_modules/di/lib/injector.js:54:19) at /usr/local/lib/node_modules/karma/lib/server.js:28:14 at Array.forEach (native) at start (/usr/local/lib/node_modules/karma/lib/server.js:27:21) at invoke (/usr/local/lib/node_modules/karma/node_modules/di/lib/injector.js:75:15) at Object.exports.start (/usr/local/lib/node_modules/karma/lib/server.js:204:12) at Object.<anonymous> (/usr/local/lib/node_modules/karma/bin/karma:19:39) 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:901:3 
+20
angularjs module karma-runner
04 Oct '13 at 15:52
source share
4 answers

You need to install jasmine:

  npm install -g karma-jasmine 
+32
Oct 09 '13 at 21:38
source share

The selected answer did not work for me, here is what it works for me:

https://github.com/karma-runner/karma/issues/880

Karma should load plugins (e.g. karma jasmine). By default (unless you specify config.plugins), Karma loads all the karma modules that are siblings for Karma.

It looks like you have karma installed globally (npm install -g karma) and a jasmine plugin locally (npm install karma jasmine). If in this case, install Karma locally.

The recommended way is to install Karma and all plugins locally, per project.

+15
Jun 03 '14 at 22:48
source share

according to the documentation needed for the plugins. // these plugins will require () from Karma "Karma-jasmine", "Karma-chrome-launcher

So add these two to your plugin section.

+9
03 Mar. '14 at 19:11
source share

I don’t know what platform / os / version you are working on, but for me, on mac os x 10.9 ("Mavericks"), I faced the same problem, trying to start karma on e2e, test using a simple document tutorial angular in step 3. I solved this in a rather dumb / dumb way =>

  • Closed a terminal / shell window in which I had all these problems.
  • A new terminal / shell window will open
  • Debug everything with sudo in front

Everything is installed / working, including ... npm install -g .

so you go.

-2
Dec 14 '13 at 1:07 on
source share



All Articles