No provider from "framework:browserify"
See original GitHub issueI’m trying to use karma to run my tests, and encounter some strange error.
I’m running everything locally, and don’t have karma installed globally.
As you can see in the debug logs, all the plugins are loaded correctly. I have made some research here and on SO before posting, and tried every solution I found, but (obviously) none worked:
- Tried adding the plugins in the plugins array in my config file.
- Tried to install
karma-cli
globally.
But still got the same issue. However, the issue varies sometimes:
If I add plugins: ['karma-browserify']
to my config file, it return me
No provider for "framework:mocha"!
But when I add plugins: ['karma-browserify', 'karma-mocha']
, it return me
No provider for "framework:browersify"!
which is pretty weird.
So I’m open to suggestions 😃
Actual behaviour
$ ./node_modules/karma/bin/karma start karma.conf.js
22 11 2016 11:29:52.391:DEBUG [plugin]: Loading karma-* from /Users/elhebert/workspace/sites/api/node_modules
22 11 2016 11:29:52.396:DEBUG [plugin]: Loading plugin /Users/elhebert/workspace/sites/api/node_modules/karma-babel-preprocessor.
22 11 2016 11:29:52.715:DEBUG [plugin]: Loading plugin /Users/elhebert/workspace/sites/api/node_modules/karma-browserify.
22 11 2016 11:29:52.873:DEBUG [plugin]: Loading plugin /Users/elhebert/workspace/sites/api/node_modules/karma-chrome-launcher.
22 11 2016 11:29:52.879:DEBUG [plugin]: Loading plugin /Users/elhebert/workspace/sites/api/node_modules/karma-firefox-launcher.
22 11 2016 11:29:52.880:DEBUG [plugin]: Loading plugin /Users/elhebert/workspace/sites/api/node_modules/karma-mocha.
22 11 2016 11:29:52.882:DEBUG [plugin]: Loading plugin /Users/elhebert/workspace/sites/api/node_modules/karma-safari-launcher.
/Users/elhebert/workspace/sites/api/node_modules/di/lib/injector.js:9
throw error('No provider for "' + name + '"!');
^
Error: No provider for "framework:browersify"! (Resolving: framework:browersify)
at error (/Users/elhebert/workspace/sites/api/node_modules/di/lib/injector.js:22:12)
at Object.parent.get (/Users/elhebert/workspace/sites/api/node_modules/di/lib/injector.js:9:13)
at get (/Users/elhebert/workspace/sites/api/node_modules/di/lib/injector.js:54:19)
at /Users/elhebert/workspace/sites/api/node_modules/karma/lib/server.js:143:20
at Array.forEach (native)
at Server._start (/Users/elhebert/workspace/sites/api/node_modules/karma/lib/server.js:142:21)
at invoke (/Users/elhebert/workspace/sites/api/node_modules/di/lib/injector.js:75:15)
at Server.start (/Users/elhebert/workspace/sites/api/node_modules/karma/lib/server.js:103:18)
at Object.exports.run (/Users/elhebert/workspace/sites/api/node_modules/karma/lib/cli.js:280:26)
at Object.<anonymous> (/Users/elhebert/workspace/sites/api/node_modules/karma/bin/karma:3:23)
at Module._compile (module.js:556:32)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.runMain (module.js:590:10)
error Command failed with exit code 1.
Environment Details
- Node version: 6.4.0
- npm version: 3.10.3
- os: Mac OsX 10.11.6
- Karma version: 1.3.0
- Relevant part of your
karma.config.js
file:
frameworks: ['mocha', 'browersify'],
browserify: {
debug: true,
transform: [
['babelify', { plugin: ["babel-plugin-es2015"] }]
],
extension: ['.js']
},
- packages.json:
"devDependencies": {
"babel-cli": "^6.18.0",
"babel-core": "^6.18.2",
"babel-preset-es2015": "^6.18.0",
"babelify": "^7.3.0",
"browserify": "^13.1.1",
"karma": "^1.3.0",
"karma-babel-preprocessor": "^6.0.1",
"karma-browserify": "^5.1.0",
"karma-chrome-launcher": "^2.0.0",
"karma-firefox-launcher": "^1.0.0",
"karma-mocha": "^1.3.0",
"karma-safari-launcher": "^1.0.0",
"mocha": "^3.1.2",
"watchify": "^3.7.0"
},
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Error: No provider for "framework:browserify"! (Resolving
I recently updated all my libraries to the most recent version and I got this error again. I realized that I was missing...
Read more >Runtime Error No provider for ApplicationInitStatus! - ionic-v3
So I think the problem is framework 3.0.0. I make and uninstall and install again like $ sudo npm uninstall -g ionic $...
Read more >karma-typescript - Bountysource
The short version is, I'm passing a Jasmine SpyObj to providers: ... 'Executed 0 of 0 ' : No tests detected with Typescript,...
Read more >Serverless Plugin Browserify
A Serverless v1.0 plugin that uses Browserify to bundle your NodeJS Lambda ... name: ${self:provider.stage}-${self:service}-pageGet ... No ES6 support.
Read more >Upgrading from AngularJS to Angular
Using a module loader such as SystemJS, Webpack, or Browserify allows us to ... All Angular code is running in the Angular framework,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@maksimr OMG, I’m going to hang myself…
Thanks !
@Elhebert me too…