I have mail configuration code in all.js
.
Now i am trying to import this in my mail.js
service, so i imported the config
module as follows :-
mail.js
config = require('config'),
all.js
mailer: {
auth: {
user: "XXXXXXX",
pass: "abc@123"
}
}
Gives me error cannot find module, but the module exists i have checked it.
How to solve this?
I used the following code & it worked :-
config = require('../config/config');
This also occurs when you don't have the config package installed. You may just need to install the config package
npm i config
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With