Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: *** process.env.ENV is not defined, assuming 'prod' env

See original GitHub issue

Starting from version 1.0.5 I’ve started getting this warning message in the browser console.

I’ve been wondering on how to get rid of it. I know how to create a custom variable, but I’m not sure how the process.env.ENV should be defined?

  1. node -v: 6.10.0

  2. npm -v: 5.0.4

  3. npm ls react-scripts: 1.0.5

  4. Operating system: Windows 10

  5. Browser and version (if relevant): Chrome


Cheers, Nemanja

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

mayurvarma14commented, Jul 5, 2017

@mnemanja Even I had same issue, it was coming from one of the chrome extension (Grammarly for Chrome). Disabling the extension solved problem!!

nerdymaxcommented, Jul 5, 2017

@mnemanja This warning comes from the latest Chrome update. Any React app I use where the ENV variable is not defined produces this error for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

process.env.ENV is not defined, assuming 'prod' env
My problem is if I use 9000 port (Given by yarn) unable to communicate with other microservices applications. Why am I getting the...
Read more >
process.env.ENV is not defined, assuming 'prod' env - ionic-v3
I have this warning in my console every time I open my app. It is probably harmless, but I want to know why...
Read more >
Using environment variables in React | by Sam Pakvis - Medium
I'm going to show you two ways to set and use environment variables for your React projects with webpack: using npm scripts and...
Read more >
What is NODE_ENV in Node.js ? - GeeksforGeeks
If NODE_ENV is not set explicitly for the environment and accessed using process.env then it will be undefined. It is a bad idea...
Read more >
Environment Variables in Next.js - Frontend Digest
The environment variable is not yet defined on the client, so undefined gets logged instead. You'll notice that the browser will log undefined...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found