You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: No default engine was specified and no extension was provided.
at new View (D:\Node_Passport\node_modules\express\lib\view.js:61:11)
at Function.render (D:\Node_Passport\node_modules\express\lib\application.js:570:12)
at ServerResponse.render (D:\Node_Passport\node_modules\express\lib\response.js:1012:7)
at D:\Node_Passport\routes\index.js:4:35
at Layer.handle [as handle_request] (D:\Node_Passport\node_modules\express\lib\router\layer.js:95:5)
at next (D:\Node_Passport\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (D:\Node_Passport\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (D:\Node_Passport\node_modules\express\lib\router\layer.js:95:5)
at D:\Node_Passport\node_modules\express\lib\router\index.js:281:22
at Function.process_params (D:\Node_Passport\node_modules\express\lib\router\index.js:335:12)
Error: No default engine was specified and no extension was provided.
at new View (D:\Node_Passport\node_modules\express\lib\view.js:61:11)
at Function.render (D:\Node_Passport\node_modules\express\lib\application.js:570:12)
at ServerResponse.render (D:\Node_Passport\node_modules\express\lib\response.js:1012:7)
at D:\Node_Passport\routes\index.js:4:35
at Layer.handle [as handle_request] (D:\Node_Passport\node_modules\express\lib\router\layer.js:95:5)
at next (D:\Node_Passport\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (D:\Node_Passport\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (D:\Node_Passport\node_modules\express\lib\router\layer.js:95:5)
at D:\Node_Passport\node_modules\express\lib\router\index.js:281:22
at Function.process_params (D:\Node_Passport\node_modules\express\lib\router\index.js:335:12)
The text was updated successfully, but these errors were encountered:
Add router.set("view engine","ejs") before taking any requests from the router. Basically, add this line after creating router. I think this should solve your problem. Moreover, as you are inside your routes folder, you need to specify the path of the views folder as well. I think you do that by adding router.use("views", __dirname + "/../views/"). There might be a typo here, but this is the gist of it.
Error: No default engine was specified and no extension was provided.
at new View (D:\Node_Passport\node_modules\express\lib\view.js:61:11)
at Function.render (D:\Node_Passport\node_modules\express\lib\application.js:570:12)
at ServerResponse.render (D:\Node_Passport\node_modules\express\lib\response.js:1012:7)
at D:\Node_Passport\routes\index.js:4:35
at Layer.handle [as handle_request] (D:\Node_Passport\node_modules\express\lib\router\layer.js:95:5)
at next (D:\Node_Passport\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (D:\Node_Passport\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (D:\Node_Passport\node_modules\express\lib\router\layer.js:95:5)
at D:\Node_Passport\node_modules\express\lib\router\index.js:281:22
at Function.process_params (D:\Node_Passport\node_modules\express\lib\router\index.js:335:12)
Error: No default engine was specified and no extension was provided.
at new View (D:\Node_Passport\node_modules\express\lib\view.js:61:11)
at Function.render (D:\Node_Passport\node_modules\express\lib\application.js:570:12)
at ServerResponse.render (D:\Node_Passport\node_modules\express\lib\response.js:1012:7)
at D:\Node_Passport\routes\index.js:4:35
at Layer.handle [as handle_request] (D:\Node_Passport\node_modules\express\lib\router\layer.js:95:5)
at next (D:\Node_Passport\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (D:\Node_Passport\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (D:\Node_Passport\node_modules\express\lib\router\layer.js:95:5)
at D:\Node_Passport\node_modules\express\lib\router\index.js:281:22
at Function.process_params (D:\Node_Passport\node_modules\express\lib\router\index.js:335:12)
The text was updated successfully, but these errors were encountered: