bradtraversy / node_passport_login

Node.js login, registration and access control using Express and Passport
1.73k stars 1.3k forks source link

Could not find the include file "./partials/messages" #92

Closed rexj8 closed 3 years ago

rexj8 commented 3 years ago

Error showing :-

Error: Could not find the include file "("./partials/messages");" at getIncludePath (E:\Github\node_passport_login\node_modules\ejs\lib\ejs.js:162:13) at includeSource (E:\Github\node_passport_login\node_modules\ejs\lib\ejs.js:306:17) at E:\Github\node_passport_login\node_modules\ejs\lib\ejs.js:702:26 at Array.forEach () at Template.generateSource (E:\Github\node_passport_login\node_modules\ejs\lib\ejs.js:678:15) at Template.compile (E:\Github\node_passport_login\node_modules\ejs\lib\ejs.js:557:12) at Object.compile (E:\Github\node_passport_login\node_modules\ejs\lib\ejs.js:389:16) at handleCache (E:\Github\node_passport_login\node_modules\ejs\lib\ejs.js:212:18) at tryHandleCache (E:\Github\node_passport_login\node_modules\ejs\lib\ejs.js:251:16) at View.exports.renderFile [as engine] (E:\Github\node_passport_login\node_modules\ejs\lib\ejs.js:482:10) at View.render (E:\Github\node_passport_login\node_modules\express\lib\view.js:135:8) at tryRender (E:\Github\node_passport_login\node_modules\express\lib\application.js:640:10) at Function.render (E:\Github\node_passport_login\node_modules\express\lib\application.js:592:3) at ServerResponse.render (E:\Github\node_passport_login\node_modules\express\lib\response.js:1008:7) at ServerResponse.res.render (E:\Github\node_passport_login\node_modules\express-ejs-layouts\lib\express-layouts.js:77:18) at E:\Github\node_passport_login\routes\users.js:13:65

How to solve this error

AtluriNikhil commented 3 years ago

Go to views and then register.ejs And change the 7th line to this

<%- include('partials/messages'); -%>

rexj8 commented 3 years ago

Thanks for the help. :)