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

how to set ENV? #263

Closed
invegat opened this issue Jul 6, 2017 · 14 comments
Closed

how to set ENV? #263

invegat opened this issue Jul 6, 2017 · 14 comments

Comments

@invegat
Copy link

invegat commented Jul 6, 2017

Tried setting the Environment variable ENV to "debug" and putting ENV="debug" in a .env root file, still get this message: process.env.ENV is not defined, assuming 'prod' env

@alicoding
Copy link
Collaborator

Try this

new webpack.DefinePlugin({
    'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development')
}),

@invegat
Copy link
Author

invegat commented Jul 6, 2017

Didn't work, also tried setting ENV and NODE_ENV environmental variables and in the root .env file to "development"

@alicoding
Copy link
Collaborator

How are you running the app right now? Have you tried doing something like NODE_ENV=debug npm start ?

@invegat
Copy link
Author

invegat commented Jul 6, 2017 via email

@alicoding
Copy link
Collaborator

Can you show some snippet of your code as to how you're using it?

@invegat
Copy link
Author

invegat commented Jul 7, 2017 via email

@invegat
Copy link
Author

invegat commented Jul 7, 2017 via email

@invegat
Copy link
Author

invegat commented Jul 7, 2017 via email

@invegat
Copy link
Author

invegat commented Jul 7, 2017 via email

@alicoding
Copy link
Collaborator

I don't see where you are using env anywhere?

@invegat
Copy link
Author

invegat commented Jul 7, 2017 via email

@invegat
Copy link
Author

invegat commented Jul 7, 2017 via email

@invegat
Copy link
Author

invegat commented Jul 7, 2017

When I disabled the Grammarly extension the error went away,

@alicoding
Copy link
Collaborator

So I guess this is not an issue then? Closing for now :)

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