I have run on my windows console:
npm install -g yo grunt-cli bower
npm install -g generator-angular
yo angular
Then I started my project with webstorm and did right click on the karma.conf.js file in the project explorer where I have the menu item 'Run karma.conf.js' and start the karma runner. Then I get his exception:
...\app\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)
Then in the console I read I can also use --force so I tried it: grunt --force
It took some time but there seemed to be no more errors. Heck why does --force install a provider ??? THIS was TESTED in the CMD.
grunt serve now worked and it started my browser with the starting app.
So what was --force doing that the 'Error: No provider for "framework:jasmine"! (Resolving: framework:jasmine)' is gone ?
When I do grunt in the webstrom IDE I get again:
Warning: No provider for "framework:jasmine"! (Resolving: framework:jasmine) Use --force to continue.
So this problem is not solved.
Here is the primary bug request on github https://github.com/yeoman/generator-angular/issues/629
According to this, the problem is more with the karma-generator in which used to contain these 2 extensions by default and no longer do.
npm i -D @types/es6-promise @types/es6-collections
for me I didn't have the karma client installed globally.
npm install -g karma-cli
I struggled with the exact same problem. After investigating I realized that karma was running globally using '/usr/' directory as the base folder.
A solution that worked for me was to replace karma with karma-cli:
For those of you using karma-spec-reporter and getting this error: "Error: No provider for "framework:jasmine"! (Resolving: framework:jasmine)"
In your karma.conf.js, remove: "plugins: ["karma-spec-reporter"]" and the error should go away.
Grunt --force works because you tell it to bypass the karma tests. Notice if you run grunt --force, it'll still say "Done, but with warnings".
To fix: add "karma-jasmine" and "karma-chrome-launcher" (or whatever launcher you use) to the devDependencies in packages.json and run npm install again.
This will save karma-jasmine and karma-chrome-launcher in your project's package.json file. The packages can then be installed by running:
Source: No provider for "framework:jasmine"! (Resolving: framework:jasmine)