BrowserlistError
khizarkhizar opened this issue · 5 comments
Steps to Reproduce
While, I run "npm run dev" command after installing all the required packages as per your instructions, the application popped an error related to Browserlist.
Error
./node_modules/react-dev-utils/webpackHotDevClient.js
[1] BrowserslistError: [BABEL] C:\Users\khiza\Downloads\Compressed\chat-app-master\client\node_modules\react-dev-utils\webpackHotDevClient.js: Unknown browser query `basedir=$(dirname "$(echo "$0" | sed -e 's`. Maybe you are using old Browserslist or made typo in query. (While processing: "C:\\Users\\khiza\\Downloads\\Compressed\\chat-app-master\\client\\node_modules\\babel-preset-react-app\\dependencies.js$0")
[1] at Array.reduce (<anonymous>)
[1] at Generator.next (<anonymous>)
Please let me know, how to fix this error.
Version
- Platform: Windows
- Node version: 12.16.1
- npm version: 6.14.9
I cannot seem to reproduce this error. It looks like an incompatibility between dependencies.
Have you tried reinstalling node_modules after deleting the package-lock.json and the node_modules directory?
Yes Davehowson, I did it (reinstall node_modules after deleting the package-lock.json and node_modules) more than one time, still facing the same issue.
I tried reinstalling for both node_module directories, one for server and the other for a client. but the error did not yet resolve.
I faced the same issue, Step I did to resolve this are:
- Removed browserList from client/package.json
- Deleted nodemodules and package.lock.json
- Run npm install in ./client (Note don't run npm run client-install in root dir)
When using React please take a look into your package.json. You may find the following added there.
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
Remove "not dead", and run yarn run build again. Fixed the issue for me.