electron-webpack icon indicating copy to clipboard operation
electron-webpack copied to clipboard

Error: Using `babel-preset-react-app` requires that you specify `NODE_ENV` or `BABEL_ENV` environment variables. Valid values are "development", "test", and "production". Instead, received: "renderer".

Open lightninglu10 opened this issue 7 years ago • 4 comments

Hey guys, I'm trying to compile my project but I get this when I run electron-webpack.

I also tried adding NODE_ENV=production electron-webpack but it's still a no go. Anyone know what's up?

lightninglu10 avatar Mar 22 '18 08:03 lightninglu10

I will check CET evening. Do you use electron-webppack 2.0.0?

develar avatar Mar 22 '18 08:03 develar

Same issue happening to me. @develar any fix for that?

ckrodrigues avatar Jul 06 '18 21:07 ckrodrigues

Bumping this, since I have the same issue. Any help?

paolostyle avatar Dec 31 '18 15:12 paolostyle

@ckrodrigues @paolostyle @lightninglu10 I was able to get around this by setting

process.env.BABEL_ENV = config.mode;

In my custom Webpack config function. Not sure if that would work for y'all but I do assume setting the BABEL_ENV will get around this issue.

jcblw avatar Sep 29 '20 20:09 jcblw