I am using config npm package to manage different environment setting with cross-env.
I have developed a node_module which has its own config directory and contains a dev.json
settings file and reading it as config.get("dbName");
I am using this node_module in another app which also has its own dev.json
settings file.
When I run this parent app like set NODE_ENV=dev node app.js
that node_modules
which I developed it reads settings my parent app config.
and my app breaks because it doesn't have config.get("dbName");
I have tried doing var config = require("config").load();