Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR in ./~/dotenv/lib/main.js #224

Closed
datasmurfen opened this issue Sep 6, 2017 · 5 comments
Closed

ERROR in ./~/dotenv/lib/main.js #224

datasmurfen opened this issue Sep 6, 2017 · 5 comments

Comments

@datasmurfen
Copy link

datasmurfen commented Sep 6, 2017

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

@jcblw
Copy link
Collaborator

jcblw commented Sep 6, 2017

are you using it client side?

@datasmurfen
Copy link
Author

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.

@jcblw
Copy link
Collaborator

jcblw commented Sep 6, 2017

@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 #172

@datasmurfen
Copy link
Author

Yes I am using webpack.

@jcblw
Copy link
Collaborator

jcblw commented Sep 6, 2017

Yeah we are not planning on supporting client side environment variables. #172 should have some solutions for your issue.

@jcblw jcblw closed this as completed Sep 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants