500 Error: Cannot find module 'undefined' #17

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

Comments

Projects
None yet
1 participant
Contributor

42thcoder commented Oct 26, 2012

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 closed this Mar 10, 2016

42thcoder reopened this Mar 10, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment