I am getting the following error when using npm
start to open create-react-app. I'm new to React and I have had no problems the past few days doing the command line to make a new app.
I have tried npx
start, npm
start and installed npm
again for the updated version.
Failed to compile ./src/index.css (./node_modules/css-loader/dist/cjs.js??ref--6-oneOf-3-1!./node_modules/postcss-loader/src??postcss!./src/index.css) BrowserslistError: Unknown browser query `android all`. Maybe you are using old Browserslist or made typo in query. at Array.reduce (<anonymous>) at Array.some (<anonymous>) at Array.filter (<anonymous>)
If you really need create-react-app , you might need to reinstall Node and reconfigure your dependencies to ensure you have a fresh start with Node, npm, npx, and the like.
To solve the React. js error "You are running create-react-app 4.0. 3, which is behind the latest release (5.0. 0)", run the npx clear-npx-cache command and re-run your app creation command, e.g. npx create-react-app my-app .
To install the full React toolchain on WSL, we recommend using create-react-app: Open a terminal(Windows Command Prompt or PowerShell). Create a new project folder: mkdir ReactProjects and enter that directory: cd ReactProjects . npx is the package runner used by npm to execute packages in place of a global install.
Should I Use Next JS or CRA? Typically if you have an application that will only be used behind a login, CRA is a good choice. However, if you have an application for which SEO is important and fast page loads are critical, then Next JS is the right solution.
It is a new bug in BrowserList.
There are new reports on this both in create-react-app: https://github.com/facebook/create-react-app/issues/7239
and in browserlist: https://github.com/browserslist/browserslist/issues/382#issuecomment-502991170
As suggested by John Forbes below the workaround given on the github issue is to change the browserslist entry in package.json to
"browserslist": []
This will build and run the project.
As proper temporal solution till bug fixing: add to package.json this:
"resolutions": { "browserslist": "4.6.2", "caniuse-lite": "1.0.30000974" },
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