How to define process.env.ENV in create-react-app?

With the 1.0.5

template version, create-react-app

I started getting a popup warning: *** process.env.ENV is not defined, assuming 'prod' env

I know how to create custom environment variables, but they require a prefix REACT_APP_

.

Now I found that the message is displayed due to a Chrome extension Grammarly

and removing it deletes the message.

However, I would like to know how I can resolve this regardless of the extensions.

I know there are two more questions on StackOverflow, but they include solutions using Webpack. Unfortunately I do not have access to Webpack as I have not selected the create-react-app and I am not planning anytime soon.

Is there a way to declare Wednesday on process.env.ENV

in create-react-app

?

EDIT:

This was the main question. Is it technically possible to define it in non-unloaded create-react-app

?

+3


source to share


1 answer


The Grammarly extension is not the reason for this Reagent. Wrote a request with Grammarly support and this is the result



Hayley (grammar support) Jul 6, 11:33 PM PDT

Hi Lenkimart,

Thank you for contacting Grammarly support!

Please rest assured that the tech team is aware of the issue and is currently working on it.

Unfortunately this will not be a quick fix and I cannot provide you with an approximate timeframe as it will take some time for the developers to analyze the cause of this issue.

I am going to close this case, but if you have more information on this matter please reply to this letter and the case will be reopened for further investigation. We apologize for any inconvenience this may cause.

Best wishes, Haley


Lankymart July 6, 12:49 PM PDT

The console window in Chrome constantly displays a warning - "process.env.ENV is not defined". Disabling extensions fixes the error, this is not site specific. Already on the Internet streams there are people reporting the same problem, and the general stream is Grammarly. Is the extension possibly buggy?

Evidence:

https://github.com/facebookincubator/create-react-app/issues/2722#issuecomment-313017403 How to define process.env.ENV in create-action-app? fooobar.com/questions/2419293 / ...

Site URL: No specific issue with the URL is an extension error.

+1


source







All Articles