ESLint-Formatter icon indicating copy to clipboard operation
ESLint-Formatter copied to clipboard

How to set NODE_ENV or BABEL_ENV in formatter config

Open anotheri opened this issue 5 years ago • 0 comments

Hey there!

I'm using babel module resolver and getting this error:

Error: [eslint-import-resolver-babel-module] Error: [BABEL] 
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: undefined. (While processing: "node_modules/babel-preset-react-app/index.js")
    at module.exports (node_modules/babel-preset-react-app/create.js:33:11)
    at module.exports (node_modules/babel-preset-react-app/index.js:19:10)
    at node_modules/@babel/core/lib/config/full.js:165:14
    at cachedFunction (node_modules/@babel/core/lib/config/caching.js:33:19)
    at loadPresetDescriptor (node_modules/@babel/core/lib/config/full.js:235:63)

How can I define env vars in eslint-formatter config? Thanks in advance.

anotheri avatar May 14 '20 12:05 anotheri