mean-stripdown
mean-stripdown copied to clipboard
Express 4.x incompatibility
The sample app is incompatible with Express 4.x, which is unfortunate -- especially for newbies (like myself) who are greeted with strange errors as they first hit node server
.
I'd argue there are two solutions:
- Update the package config to specify
"express": "3.*"
- Actually make the thing up to date with Express 4.
I'd be willing to submit a PR for either.
+1
anyone feel like updating the express.js files? I might take a stab at it just for fun or heck say screw this stack and build it on mean.js stack
same here
jmduke, a little late to the party, but good call.
I was getting an error that basically meant that Express 4.x had stopped bundling the Middleware with the Express package.
The error linked me to https://github.com/senchalabs/connect, where I was confused even more.
Coming to this error thread, the Express version change worked perfectly for me.
- Enter your package.json file in edit mode.
- Change "express": "latest" to "express": "3"
- Save the file, run node server.
- Visit 127.0.0.1:3000, and you should see a page with a black header and welcome text.
I tried changing the code to work with express 4.0. I installed all the packages from npm like body-parser, cookie-parser and so on. I "required" them in the code. Then changed the syntax from
app.use(express.bodyParser()) to app.use(bodyParser()) and similarly for other middleware.
Still I am getting the error for session, when I already did the process for express-session.