
We're unable to detect target browsers. react app
We're unable to detect target browsers. react app
You have to add browserslist in the package.json file to avoid the error: We're unable to detect target browsers. react app.
You have to add below code in package.json file of react app.
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
Your code will look like below after adding the code in it.
{
"name": "react-app",
"version": "0.1.0",
"private": true,
"dependencies": {
"cra-template": "1.2.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-scripts": "^4.0.3"
},
"scripts": {
"start": "react-scripts start",
"test": "react-scripts test",
"build": "react-scripts build",
"eject": "react-scripts eject"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
Now you can run the npm start command in the terminal to run the app.
npm start
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
Don't forget to share this article! Help us spread the word by clicking the share button below.
We appreciate your support and are committed to providing you valuable and informative content.
We are thankful for your never ending support.
Random Code Snippet Queries: React
- React-dom.development.js:86 Warning: validateDOMNesting(...):
- How do I link to an external URL in React?
- Module Not Found: Can’T Resolve ‘Jquery’ In React
- Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead
- Get the ID from a URL in React and React Router
- Uncaught Error: useHref() may be used only in the context of a <Router> component
- How to pass dynamic URL to Link in react ?
- Module not found: Error: Can't resolve 'prop-types'