toddbluhm / env-cmd

Setting environment variables from a file
https://www.npmjs.com/package/env-cmd
MIT License
1.73k stars 65 forks source link

process is not defined #337

Open RafMazza opened 2 years ago

RafMazza commented 2 years ago

Hi, I have two . env files, one for dev and one for prod. In package.json I have add:

"scripts": {
    "start": "env-cmd -f ./environments/.dev.env yarn start:dev",
    "start:dev": "set PORT=4200 && react-scripts start",
  },

But in the browser console, I have this error message: image

fgira commented 2 years ago

Hi @RafMazza,

If think your problem is the same as : process is not defined.

I have upgrade to react-script 5.0.0 and it solved the problem.

If you want all details and all solutions of this problem see this