Closed olivierlfranck closed 2 years ago
please use lowercase "layout"
i used lowercase "layout" this is the configuration of my home.ejs file but still error come when using lowercase
boilerplate.ejs.txt home.ejs.txt about.ejs.txt
these are the file involved but still getting same error thanks to help me ahead
Remove the .txt
extension.
i'm getting this error ReferenceError: C:\Users\OLYNSEC\ecommerce\views\home.ejs:1
Layouts is not defined at eval (eval at compile (C:\Users\OLYNSEC\ecommerce\node_modules\ejs\lib\ejs.js:549:12),:9:8)
at returnedFn (C:\Users\OLYNSEC\ecommerce\node_modules\ejs\lib\ejs.js:580:17)
at tryHandleCache (C:\Users\OLYNSEC\ecommerce\node_modules\ejs\lib\ejs.js:223:34)
at View.exports.renderFile [as engine] (C:\Users\OLYNSEC\ecommerce\node_modules\ejs\lib\ejs.js:437:10)
at View.render (C:\Users\OLYNSEC\ecommerce\node_modules\express\lib\view.js:127:8)
at tryRender (C:\Users\OLYNSEC\ecommerce\node_modules\express\lib\application.js:640:10)
at EventEmitter.render (C:\Users\OLYNSEC\ecommerce\node_modules\express\lib\application.js:592:3)
at ServerResponse.render (C:\Users\OLYNSEC\ecommerce\node_modules\express\lib\response.js:971:7)
at C:\Users\OLYNSEC\ecommerce\server.js:46:7
at Layer.handle [as handle_request] (C:\Users\OLYNSEC\ecommerce\node_modules\express\lib\router\layer.js:95:5)
at next (C:\Users\OLYNSEC\ecommerce\node_modules\express\lib\router\route.js:137:13)
at Route.dispatch (C:\Users\OLYNSEC\ecommerce\node_modules\express\lib\router\route.js:112:3)
at Layer.handle [as handle_request] (C:\Users\OLYNSEC\ecommerce\node_modules\express\lib\router\layer.js:95:5)
at C:\Users\OLYNSEC\ecommerce\node_modules\express\lib\router\index.js:281:22
at Function.process_params (C:\Users\OLYNSEC\ecommerce\node_modules\express\lib\router\index.js:335:12)
at next (C:\Users\OLYNSEC\ecommerce\node_modules\express\lib\router\index.js:275:10)
can someone help me using latest version of nodejs thank you ahead