From what I read, you don't need dotenv anymore with create-react-app. It is supported out of the box
Create your .env file in the root folder, not in src.
And be sure to restart your server.
Source: stackoverflow.com/questions/491081...
I also noticed that react-mailchimp-subscribe 2.1.1 was not yet supporting React 17, and I had to install it with npm i react-mailchimp-subscribe --force
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
From what I read, you don't need dotenv anymore with create-react-app. It is supported out of the box
Create your .env file in the root folder, not in src.
And be sure to restart your server.
Source: stackoverflow.com/questions/491081...
I also noticed that react-mailchimp-subscribe 2.1.1 was not yet supporting React 17, and I had to install it with npm i react-mailchimp-subscribe --force