Unable to launch my app using sudo yarn build
I am getting this error:
package.json » eslint-config-react-app/jest#overrides[0]:
Environment key "jest/globals" is unknown
What would be a solution for this error?
Update Package.json(Remove "react-app/jest" from extends array
"eslintConfig": { "extends": [ "react-app" ] },
if you are using eslintconfig delete that or remove the react-app/jest from there extends array and keep only react-app Run npm install and check again It should work.
I had the same issue with npm.
Resolution took editing package.json
Find and remove the whole eslintConfig
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
also I had devDependencies that needed to be removed.
"devDependencies": {
"eslint": "7.30.0",
"eslint-config-airbnb": "18.2.1",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-import": "2.23.4",
"eslint-plugin-jsx-a11y": "6.4.1",
"eslint-plugin-prettier": "3.4.0",
"eslint-plugin-react": "7.24.0",
"eslint-plugin-react-hooks": "4.2.0",
"prettier": "2.3.2"
}
I ran "npm install". The error cleared. Then I added all of the above back into the package.json. I ran "npm install" again with no errors.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With