First deployment of Nodejs app using npm command set in the dashboard displayed running.
The build process animation shows in progress. However, the app sows running on render deployment console, the web page shows 502 error, while the build failed after a while.
This issue is occurring because there has not been a successful deployment of the application. Service will return 502 responses until at least one successful deployment has occurred.
The web services are flawa-test and flawa, deployment is now successful, but i am still getting error.
I changed from npm to yarn and the app is running on console but the site is throwing error as “Internal Server Error”
The app is working locally, however, on render console i saw the below exception throw:
==> Starting service with ‘node app.js’
Sep 14 08:40:06 AM Warning: connect.session() MemoryStore is not
Sep 14 08:40:06 AM designed for a production environment, as it will leak
Sep 14 08:40:06 AM memory, and will not scale past a single process.
Sep 14 08:40:06 AM Server is running on port 10000
Sep 14 08:40:10 AM Error: /opt/render/project/src/views/pages/index.ejs:1
Sep 14 08:40:10 AM >> 1| <%- include(‘/partials/headerindex’, { pageTitle: ‘Home’, showSidebar: false, barname:‘user’ }) %>
Sep 14 08:40:10 AM 2|
Sep 14 08:40:10 AM 3|
Sep 14 08:40:10 AM 4|
Sep 14 08:40:10 AM
Sep 14 08:40:10 AM ENOENT: no such file or directory, open ‘/opt/render/project/src/views/partials/headerindex.ejs’
Sep 14 08:40:10 AM at Object.openSync (node:fs:601:3)
Sep 14 08:40:10 AM at Object.readFileSync [as fileLoader] (node:fs:469:35)
Sep 14 08:40:10 AM at fileLoader (/opt/render/project/src/node_modules/ejs/lib/ejs.js:293:18)
Sep 14 08:40:10 AM at handleCache (/opt/render/project/src/node_modules/ejs/lib/ejs.js:224:18)
Sep 14 08:40:10 AM at includeFile (/opt/render/project/src/node_modules/ejs/lib/ejs.js:323:10)
Sep 14 08:40:10 AM at include (/opt/render/project/src/node_modules/ejs/lib/ejs.js:701:16)
Sep 14 08:40:10 AM at eval (“/opt/render/project/src/views/pages/index.ejs”:10:17)
Sep 14 08:40:10 AM at index (/opt/render/project/src/node_modules/ejs/lib/ejs.js:703:17)
Sep 14 08:40:10 AM at tryHandleCache (/opt/render/project/src/node_modules/ejs/lib/ejs.js:274:36)
Sep 14 08:40:10 AM at exports.renderFile [as engine] (/opt/render/project/src/node_modules/ejs/lib/ejs.js:491:10)
The below setting is working fine locally but causing errors on render:
<%- include(‘/partials/headerindex’, { pageTitle: ‘Home’, showSidebar: false, barname:‘user’ }) %>
<%- include(‘…/…/partials/headerindex’, { pageTitle: ‘Home’, showSidebar: false, barname:‘user’ }) %>
I think Keith means that ‘headerindex.ejs’ is instead ‘headerindex.ejs’ in your code, but you’re trying to import the file in the former format. Can you confirm that?
Actually, I have tried …/partials/footerindex.ejs
Actually, I have tried …/partials/footerindex
Please note that partials directory is of the same parent directiory with index.js file
it worked when i use footerindex.ejs only and having the index.ejs file as siblings to the file(index.js) where it is being included