Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update middleware "errorhandler" to the Express 4.x new style #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

loic-moriame
Copy link

Replace the old middleware "error-handler" by the new one "errorhandler"
Now the command line node app.js just work like a charm !

I also add a simple .gitignore file to exclude "node_modules" folder : I guess is best for a seed Node.js project

- add a .gitignore file to ignore node_modules/ folder
@melo0187
Copy link

Can confirm both the issue and this fix.

Cloned seed, ran npm install and node app.js returned:

Error: Most middleware (like errorHandler) is no longer bundled with Express and must be installed separately. Please see https://github.com/senchalabs/connect#middleware.
    at Function.Object.defineProperty.get (/home/melo/projects/experiments/web/ang-exp-btford-example/node_modules/express/lib/express.js:89:13)
    at Object.<anonymous> (/home/melo/projects/experiments/web/ang-exp-btford-example/app.js:36:19)
    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 Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3

Applied moriame's patches to package.json and app.js, ran npm install again and after that node app.js starts without issues. Thanks @Moriame !

@gu-fan
Copy link

gu-fan commented Jul 9, 2014

That's right. The latest commit have not get change the app.use(errorHandler());

@jamesmorgan
Copy link

I get this error as well, any chance of a fix?

@Doogiemuc
Copy link

Had the same problem. The proposed solution works like a charm. Thanks for it! Please merge this pull request.

@CplSyx
Copy link

CplSyx commented Mar 23, 2015

Thanks for this! Still an issue as not yet merged, but straightforward to make the change manually.

@mattklein999
Copy link

Thanks, fixed it for me too! Should be merged into master.

@toome123
Copy link

Please merge ... Fix is needed 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants