Error: Error: Configuration property <property_name> is not defined #14142
-
Hi Everyone |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi 🤩, const path = require("path");
process.env["NODE_CONFIG_DIR"] = path.resolve(__dirname, "../../config"); // Path to your config files
const config = require("config");
module.exports = {
development: config.get("dbConfig"),
test: config.get("dbConfig"),
production: config.get("dbConfig"),
}; |
Beta Was this translation helpful? Give feedback.
Hi 🤩,
After 2 hours of debugging, I found a solution.
In my project I am using the popular npm package -
config
, and it injects DB credential.If someone has a similar problem, it should be add to your
database/config/config.js
file this: