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

500 Error: Cannot find module 'undefined' #17

Open
42thcoder opened this issue Oct 26, 2012 · 1 comment
Open

500 Error: Cannot find module 'undefined' #17

42thcoder opened this issue Oct 26, 2012 · 1 comment

Comments

@42thcoder
Copy link
Contributor

Thanks for your example. It really helps.

There is an issue here. When I try to run option1, there is an error "500 Error: Cannot find module 'undefined'".

After I repalce the code in app.js

app.get('/todo', function(req, res){
  res.render('todo', {title: "MongoDB Backed TODO App"});
});

with code like this

app.get('/todo', function(req, res){
    res.sendfile(__dirname + '/public/static.html');
});

It works just fine. Why?
If it's an bug, would you fix it?

@42thcoder 42thcoder reopened this Mar 10, 2016
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

No branches or pull requests

2 participants
@42thcoder and others