Closed bennycode closed 7 years ago
To solve the "Cannot find module 'requirejs'" issue I did npm install -g requirejs
. But when using karma start
I still have this issue (on Windows 10 Home):
06 06 2016 15:38:59.402:WARN [plugin]: Cannot find plugin "karma-browserify". Did you forget to install it ? npm install karma-browserify --save-dev 06 06 2016 15:38:59.409:WARN [preprocess]: Can not load "browserify", it is not registered! Perhaps you are missing some plugin? C:\Users\Benny\AppData\Roaming\npm\node_modules\karma\node_modules\di\lib\injector.js:9 throw error('No provider for "' + name + '"!');
And I definetly executed npm install karma-browserify --save-dev
. I also added plugins
to karma.conf.js
:
...
singleRun: false,
concurrency: Infinity,
plugins: [
'karma-browserify'
]
...
What about the following?
rm -rf node_modules # remove node modules directory in your project
npm install #reinstall all dependencies
I already tried that. By the way, I have the same issue when trying to run your example code: https://github.com/nikku/karma-browserify/tree/master/example
D:\dev\projects\temp\karma-browserify\example>karma start 06 06 2016 16:59:39.425:DEBUG [plugin]: Loading karma-* from C:\Users\Benny\AppData\Roaming\npm\node_modules 06 06 2016 16:59:39.431:DEBUG [plugin]: Loading plugin C:\Users\Benny\AppData\Roaming\npm\node_modules/karma-chrome-launcher. 06 06 2016 16:59:39.488:DEBUG [plugin]: Loading plugin C:\Users\Benny\AppData\Roaming\npm\node_modules/karma-coffee-preprocessor. 06 06 2016 16:59:39.619:DEBUG [plugin]: Loading plugin C:\Users\Benny\AppData\Roaming\npm\node_modules/karma-jasmine. 06 06 2016 16:59:39.628:DEBUG [plugin]: Loading plugin C:\Users\Benny\AppData\Roaming\npm\node_modules/karma-mocha. 06 06 2016 16:59:39.637:DEBUG [plugin]: Loading plugin C:\Users\Benny\AppData\Roaming\npm\node_modules/karma-requirejs. 06 06 2016 16:59:39.652:WARN [preprocess]: Can not load "browserify", it is not registered! Perhaps you are missing some plugin? module.js:328 throw err; ^ Error: Cannot find module 'jasmine-core'
I am using node v5.3.0 on Windows 10 Home. Is karma-browserify
(and it's dependencies) compatible with Windows?
By the way... Hello from Berlin to Berlin. :grinning:
same issue here.
@Moezalez also on Windows?
I have no Windows to checkout that stuff here. Will see if I can get a Windows VM from somewhere and try to reproduce the problem.
@nikku it was on OSX
win10 same problem
Please post your nodejs / npm version, too.
Sorry, {npm: '2.15.5', node: '4.4.5'}
I'm having the same problem on OSX (10.11.5), with node 6.3.0 and npm 3.10.3.
16 08 2016 23:48:16.209:DEBUG [plugin]: Loading plugin karma-browserify. 16 08 2016 23:48:16.213:ERROR [plugin]: Cannot find plugin "karma-browserify". Did you forget to install it? npm install karma-browserify --save-dev 16 08 2016 23:48:16.213:DEBUG [karma]: Registered a load error of type plug_in with name karma-browserify 16 08 2016 23:48:16.216:ERROR [preprocess]: Can not load "browserify", it is not registered! Perhaps you are missing some plugin?
same here. I run it using Webstorm.
29 08 2016 23:31:45.862:WARN [preprocess]: Can not load "browserify", it is not registered!
Perhaps you are missing some plugin?
/Users/.../node_modules/karma/node_modules/di/lib/injector.js:9
throw error('No provider for "' + name + '"!');
^
Error: No provider for "framework:browserify"! (Resolving: framework:browserify)
What's your NodeJS / NPM version / package.json like?
Sorry I fixed it already. I actually follow this guy http://stackoverflow.com/a/30781687. But what he did not mention is you have to add 'karma-browserify' in the plugin field. I also leave a comment there for others who may face the same problem.
I was having the same problem on OSX. I was able to fix it by installing karma-browserify
globally with: npm install -g karma-browserify
. I believe this works because when running karma start
you are invoking karma from usr/local/bin
, so karma tries to resolve karma-browserify
from that directory, which won't work unless its installed globally. I could be wrong though.
Closing this, as we cannot reproduce it ourselves and a workaround exists.
npm install -g karma-browserify
I am facing this issue on windows 10 too. Found this answer and get inspired and verified that npm install --save-dev karma-browserify
can actually work, too.
I am getting the error
Can not load "browserify"
when executingkarma start
:Can you help my finding out why this happens?
Here is my package.json:
And my karma.conf.js:
My CalcSpec.js is this: