mean-stack-angular5-crud
mean-stack-angular5-crud copied to clipboard
Error: No default engine was specified and no extension was provided.
I created new login component i add routes for login but when try to run this page i am getting No default engine was specified and no extension was provided.can you please help me out if i want to add new pages what can i do help me
same thing happened for me
Me.. Too.. Plz Help
I had this issue and fixed with these two lines in app.js:
app.engine('html', require('ejs').renderFile); app.set('view engine', 'html');
There may be a better solution, as I am new to the MEAN stack myself. The only issue I am having now with this tutorial is any manual refresh of the browser or manual typing of urls bypasses the angular routes and tries to use the node routes. I've read a few posts about fixing this, but would love to see what didinj's solution would be.
I also had this issue and found a fix for that, just add below code in app.js
app.use('/book-create', express.static(path.join(__dirname, 'dist')));
app.use('/book-details/:id', express.static(path.join(__dirname, 'dist')));
app.use('/book-edit/:id', express.static(path.join(__dirname, 'dist')));
after this code
app.use('/books', express.static(path.join(__dirname, 'dist')));
Above we are just defining the routes for each link. P.S. If anyone has any other solution, I would love to know that.
Please I am having same error, I dont know whyyy
add last line too as mentioned below with commenets app.use('/books', express.static(path.join(__dirname, 'dist'))); app.use('/book', book); app.use('', book); //add this line too