I am getting this funky error running on version:
"dotenv": "^4.0.0",
ERROR in ./~/dotenv/lib/main.js
Module not found: Error: Can't resolve 'fs' in '/home/datasmurfen/Code/project/node_modules/dotenv/lib'
@ ./~/dotenv/lib/main.js 3:9-22
are you using it client side?
I run it locally on my machine - if I get your question correct.
I was able to supress the warning message by adding this to my package.json:
node: {
fs: 'empty',
child_process: 'empty',
}
But some how the app render just blank page then.
@datasmurfen sorry let me clarify my question. Are you using it with something like webpack or browserify? Then you might wanna checkout some possible solutions in https://github.com/motdotla/dotenv/issues/172
Yes I am using webpack.
Yeah we are not planning on supporting client side environment variables. https://github.com/motdotla/dotenv/issues/172 should have some solutions for your issue.