Closed gituserjava closed 1 year ago
/email/body.js
is an absolute path from filesystem root; I'm assuming you wanted ./email/body.js
to pull from the current directory?
@RyanZim , I tried the above as well and it did not work. Yes, I need to pull from current directory. My node js start file is also within the same directory. Please advise.
src
— email
— email-service.ts
— body.ejs
What directory are you running node from?
@RyanZim , I fixed it; above suggestion worked!
I am using ejs (v 3.1.9) within a Node JS (v16.0) backend application for generating email templates. I am only using Node JS and I am not using
express
or any other frameworks.When running my code, I always get below error. I searched various articles and other issues in the GitHub project but none of them helped. Please advise.
Error:
ENOENT : no such file or director, open ‘/email/body.js’
Code: