debug: Doesn't work with dotenv anymore.
The following code snippet works with the version 3.2.6
but it doesn’t work with 4.1.1
.
import dotenv from 'dotenv';
dotenv.config();
const debug = require('debug');
const log = debug('app');
log('Something');
I’ve checked the 4.x change logs but I couldn’t find anything related to this.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 18 (8 by maintainers)
👋 maintainer of dotenv here. from what I was able to reproduce in https://github.com/motdotla/dotenv/pull/398 dotenv is working, debug is working, but mixing together with babel-node seems to not work as expected. if anyone would like to help complete the example in that PR (i.e. make it work), that will help identify which package, if any, needs an update ❤️ I’m also open to any other fully re-produceable examples (i.e. not code snippets in comments 😸)
Then you need to open a ticket with them; there’s nothing I can do about that.
@botond-veress it works for me. I suggest you try: