I am trying to set up different environment files in a React project (using create-react-app). I following the official documentation but I am getting an error:
'.env.development' is not recognized as an internal or external command,
I have .env, .env.local, .env.development, .env.production in the same level as package.json and src/
My scripts in package.json:
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
Also tried other option: "start": ".env.local, .env.development, .env".
Both return similar errors as referenced above when I run npm start.
All my keys start with the prefix: REACT_APP_. Ex: REACT_APP_API_KEY.
What am I missing?