I am building an electron app that utilizes react for the UI. I need to override the webpack.config.js
file, and so I have ran the eject script, however I am now receiving the following error. There are limited resources regarding this issue so I am unsure what I can do to solve this.
Using
babel-preset-react-app
requires that you specifyNODE_ENV
orBABEL_ENV
environment variables. Valid values are "development", "test", and "production". Instead, received: undefined.
This error is appearing in every file, and is preventing it from compiling.
I managed to solve this issue by adding the following lines to my eslintConfig within my package.json file.
"parser": "jsx",
"parserOptions": { "babelOptions": { "presets": [ ["babel-preset-react-app", false] ] } }