nikku / karma-browserify

A fast Browserify integration for Karma that handles large projects with ease
MIT License
321 stars 50 forks source link

Error: No provider for "framework:browserify"! #185

Closed mmcasavant closed 8 years ago

mmcasavant commented 8 years ago

Hi!

I'm trying to integrate karma browserify and I'm getting the following error:

throw error('No provider for "' + name + '"!'); Error: No provider for "framework:browserify"! (Resolving: framework:browserify)

My Configuration:

    // base path, that will be used to resolve files and exclude
    basePath:'',

    plugins: ['browserify'],
    // frameworks to use
    frameworks: ['browserify','jasmine'],

    // list of files / patterns to load in the browser
    files: [
        {pattern: 'spec/javascripts/fixtures/*.html', included: false},
        '../../WebContent/js/jquery.min.js',
        'jasmine-extensions/*.js',
        {pattern: '../../WebContent/js/pages/bumper.vm.js', served: true, included: false},
        '../../tests/specs/*spec.js'
    ],

    // list of files to exclude
    exclude: [

    ],

    // web server port
    port: 9876,

    // enable / disable colors in the output (reporters and logs)
    colors: true,

    // level of logging
    // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
    logLevel: config.LOG_DEBUG,

    // enable / disable watching file and executing tests whenever any file changes
    autoWatch: true,

    browsers: ['PhantomJS'],

    // If browser does not capture in given timeout [ms], kill it
    captureTimeout: 60000,

    // Continuous Integration mode
    // if true, it capture browsers, run tests and exit
    singleRun: false,

    //reporters: ['progress', 'coverage'],
    preprocessors: {
        '../../tests/specs/*spec.js' : ['coverage']
    }

I have seen a few posts about this issue being related to globally installing the tool? Unfortunately, this is not an option for me as my employer has chosen to install node into the project ONLY and does not allow node to be installed globally. Is there another known workaround for this issue? It sounds like it could be the solution to my issues but I cannot install the tool globally. Does the tool / node need to be installed globally for it to work? I apologize if I'm being vague, I'm in quite over my head with this one as my understanding of node is limited.

Thanks

bendrucker commented 8 years ago

How did you install karma and karma-browserify?

mmcasavant commented 8 years ago

I manually downloaded them and their dependencies and added them into the project. I know... probably not the safest way but I did make sure the versions / dependencies line up.

bendrucker commented 8 years ago

Short of you giving us your whole folder of deps it's pretty much impossible for us to offer any advice here. Your best bet is to install everything locally in the project.