chat-app icon indicating copy to clipboard operation
chat-app copied to clipboard

BrowserlistError

Open khizarkhizar opened this issue 3 years ago • 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

khizarkhizar avatar Dec 06 '20 14:12 khizarkhizar

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?

davehowson avatar Dec 07 '20 13:12 davehowson

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.

khizarkhizar avatar Dec 07 '20 18:12 khizarkhizar

I tried reinstalling for both node_module directories, one for server and the other for a client. but the error did not yet resolve.

khizarkhizar avatar Dec 07 '20 18:12 khizarkhizar

I faced the same issue, Step I did to resolve this are:

  1. Removed browserList from client/package.json
  2. Deleted nodemodules and package.lock.json
  3. Run npm install in ./client (Note don't run npm run client-install in root dir)

SallarBhutto avatar Apr 01 '21 06:04 SallarBhutto

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.

UtkarshA135 avatar Jun 22 '21 10:06 UtkarshA135