Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
136
rated 0 times [  139] [ 3]  / answers: 1 / hits: 27932  / 9 Years ago, sun, september 6, 2015, 12:00:00

When I run karma start I get the following issues



C:devlJSmyProject>karma start
06 09 2015 11:30:19.133:WARN [plugin]: Cannot find plugin karma-chrome-launcher
.
Did you forget to install it ?
npm install karma-chrome-launcher --save-dev
06 09 2015 11:30:19.149:WARN [plugin]: Cannot find plugin karma-firefox-launche
r.
Did you forget to install it ?
npm install karma-firefox-launcher --save-dev
06 09 2015 11:30:19.159:WARN [plugin]: Cannot find plugin karma-ie-launcher.
Did you forget to install it ?
npm install karma-ie-launcher --save-dev


when I do npm list I can see the dependencies at the bottom of the tree



├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └─┬ [email protected]
│ └─┬ [email protected]
│ └── [email protected]
├── [email protected]
├─┬ [email protected]
│ └── [email protected]
└── [email protected]


I have tried nuking my node_dependencies and running npm install again and i'm not sure what else to try



EDIT: I have verified in my node_dependencies directory and the plugin directories are in there.


More From » node.js

 Answers
39

There are a two seemingly-similar complaints when first getting started with Karma:



[preprocess]: Can not load webpack, it is not registered!
Perhaps you are missing some plugin?


and



[plugin]: Cannot find plugin karma-webpack.
Did you forget to install it ?
npm install karma-webpack --save-dev


The following is my best recommendation for fixing these two problems with your configuration…



Can not load XYZ, it is not registered! (sic)



The typical solution to the 'Perhaps you are missing some plugin?' message is to make sure it's included within the plugins array in karma.conf.js.



plugins: [
'karma-chrome-launcher',
'karma-tap',
'karma-sourcemap-loader',
'karma-webpack' // *** This 'registers' the Karma webpack plugin.
],


Cannot find plugin 'karma-xyz'.



If you've already installed it by running npm install karma-xyz --save-dev, but Karma still prompts (read: taunts) you with the Did you forget to install it ? warning, you may have a global installation of the Karma module.



Chances are that when you installed a global copy of the karma-cli using -g, you included karma (or were told to do so by a well-meaning tutorial), but that can cause problems resolving modules in certain versions (i.e., every version I've ever used). Karma's installation documentation recommends that the module should be a local installation using npm install karma --save-dev.



If you have a global Karma installation, try something like:



$ npm uninstall -g karma
$ npm install karma --save-dev

[#65169] Thursday, September 3, 2015, 9 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kenyamelinad

Total Points: 339
Total Questions: 85
Total Answers: 116

Location: Marshall Islands
Member since Sun, Aug 29, 2021
3 Years ago
;