This is my repository on Github-> GitHub - melbourne2827/Budgr2: A budget tracking website
I’ve been trying to deploy this using the new web service option. I set the build command as npm install, start command as node app.js and set the environment variable for DB_URL (Mongo DB Atlas Database Used). This project runs perfectly well on my localhost. But I end up getting this error from render
ReferenceError: views/layouts/boilerplate.ejs:16
Apr 26 06:55:57 PM 14|
Apr 26 06:55:57 PM 15|
Apr 26 06:55:57 PM >> 16| <%- include(‘…/partials/navbar’) %>
Apr 26 06:55:57 PM 17|
Apr 26 06:55:57 PM 18| <%-include(‘…/partials/flash’) %>
Apr 26 06:55:57 PM 19| <%- body %>
/opt/render/project/src/views/partials/navbar.ejs:9
Apr 26 06:55:57 PM 7|
Apr 26 06:55:57 PM 8|
-
Apr 26 06:55:57 PM 11| analytics
Apr 26 06:55:57 PM 12|
Apr 26 06:55:57 PM >> 9| <% if(currentUser){ %>
Apr 26 06:55:57 PM 10|
currentUser is not defined
Apr 26 06:55:57 PM at eval (“/opt/render/project/src/views/partials/navbar.ejs”:12:8)
Apr 26 06:55:57 PM at navbar (/opt/render/project/src/node_modules/ejs/lib/ejs.js:703:17)
Apr 26 06:55:57 PM at include (/opt/render/project/src/node_modules/ejs/lib/ejs.js:701:39)
Apr 26 06:55:57 PM at eval (“views/layouts/boilerplate.ejs”:12:17)
Apr 26 06:55:57 PM at boilerplate (/opt/render/project/src/node_modules/ejs/lib/ejs.js:703:17)
Apr 26 06:55:57 PM at tryHandleCache (/opt/render/project/src/node_modules/ejs/lib/ejs.js:274:36)
Apr 26 06:55:57 PM at exports.renderFile (/opt/render/project/src/node_modules/ejs/lib/ejs.js:491:10)
Apr 26 06:55:57 PM at renderFile (/opt/render/project/src/node_modules/ejs-mate/lib/index.js:298:7)
Apr 26 06:55:57 PM at /opt/render/project/src/node_modules/ejs-mate/lib/index.js:353:7
Apr 26 06:55:57 PM at tryHandleCache (/opt/render/project/src/node_modules/ejs/lib/ejs.js:280:5)
Could someone tell me as to what is going wrong??