zayquan
zayquan

Reputation: 8062

karma-browserify fails with bundle() no longer accepts options arguments

When I run my karma unit tests I get the following error:

karma start karma.conf.js 

Fatal error: bundle() no longer accepts option arguments
Move all option arguments to the browserify() constructor.

I am running using the following versions:

karma 0.12.21
karma-browserify 0.2.1
browserify 5.9.3

Upvotes: 4

Views: 1387

Answers (1)

zayquan
zayquan

Reputation: 8062

The issue is that the karma-browserify version 0.2.1 - currently the latest version - is not compatible with the 5.0.0 release of browserify on Jul 22, 2014.

The package.json in karma-browserify does not prevent the 5.0.0 or greater version of browserify to be installed on an npm install, so when you install a new project or update your browserify version you will get this error.

until karma-browserify is updated you can force your project to use the most recent 4.X version of browserify - which is compatible with karma-browserify - version 4.2.3 via adding the following line to package.json:

"browserify" : "^4.0.0"

then running:

npm update browserify

Upvotes: 6

Related Questions