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

Got MISSING_ENV_VAR Even though it's already configured in webpack #484

Open
rex-pj opened this issue Mar 18, 2022 · 4 comments
Open

Got MISSING_ENV_VAR Even though it's already configured in webpack #484

rex-pj opened this issue Mar 18, 2022 · 4 comments

Comments

@rex-pj
Copy link

rex-pj commented Mar 18, 2022

Hi Team.
I've got this error when calling process.env "MISSING_ENV_VAR"
This is my configuration in webpack.config.js
image

These are my .env... files
image

Can you help me?

@likuner
Copy link

likuner commented Apr 9, 2022

I have a same problem like above

@mrsteele
Copy link
Owner

Delete the safe: true line and you both should be fine.

@luckylooke
Copy link

luckylooke commented Jun 17, 2022

I have same issue even I try to explicitly set safe to false

   new Dotenv({
            safe: false,
        }),

🤔

I have only .env file created

@luckylooke
Copy link

luckylooke commented Jun 17, 2022

Ok. my problem was caused by trying to log whole env console.log('env', process.env);, which is incorrect, as correct way is to reference the direct value console.log('env', process.env.MY_VALUE);, now it works 👍

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

4 participants