I am finding this issue with the angular-seed project. This issue happens when I run `npm test'. This happens just after downloading the seed, without modifying any of its files. Here is the error I am getting:
var json = require('connect').json()
^
TypeError: Object function createServer() {
function app(req, res, next){ app.handle(req, res, next); }
merge(app, proto);
merge(app, EventEmitter.prototype);
app.route = '/';
app.stack = [];
return app;
} has no method 'json'
at Object.<anonymous> (C:\Learning\Web\AngularJs\Projects\angular-seed\node_modules\karma\lib\middleware\runner.js:11:31)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (C:\Learning\Web\AngularJs\Projects\angular-seed\node_modules\karma\lib\web-server.js:7:24)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
npm ERR! weird error 8
npm ERR! not ok code 0
I have seen some posts in StackOverflow like this one. I have reinstalled karma, karma-jasmine and karma-phantomjs-launcher. But did not help.
Any solution for this issue?
Upgrading the node.js resolved this issue. I was the node.js version ~0.10.