bolducp / Express_Angular2_Twitter_App

an Express-Angular 2 app using the Twitter API to display Corcoran data
35 stars 14 forks source link

No default [view] engine was specified #3

Open dylanh724 opened 7 years ago

dylanh724 commented 7 years ago

What do I specify as the default view engine? Apparently it HAS to have one, even though I deleted the views folder and removed references (I at least think I removed the ref's -- I'll check more thoroughly after this post).

magz99 commented 7 years ago

I had the same error initially, it seems to be due to the error handler function in app.js:

res.render('error', { message: err.message, error: {} });

Since there is no view registered, it cannot render it. I just changed anywhere that has res.render to:

res.send('error');