I need to create a web service and I am using Node.js in server. But when I am running in localhost I am getting an error:
Error: Most middleware (lik
I am having a similar problem, and havent been able to resolve it yet.
But as per my reading, from various sources you need to:
Either update your package.json to include the dependencies for all the middleware like:
"dependencies": {
"express": "*",
"body-parser": "*",
"method-override": "*",
.
.
.
}
or you can just run each one separately on the command prompt as
npm install body-parser --save-dev
You will have to do this for the middleware that you use out of the short list shown here or the complete list here.
As far as I can make out, in your code, you are using: body-parser, method-override, static and errorhandler.
You will have to remove the line:
app.use(app.router);as described here
As I said, I am also, working on it. I suggest you make the changes, and tell me if the error on the console changes.