Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BrowserlistError #15

Open
khizarkhizar opened this issue Dec 6, 2020 · 5 comments
Open

BrowserlistError #15

khizarkhizar opened this issue Dec 6, 2020 · 5 comments

Comments

@khizarkhizar
Copy link

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
@davehowson
Copy link
Owner

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?

@khizarkhizar
Copy link
Author

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
Copy link
Author

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

@SallarBhutto
Copy link

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)

@UtkarshA135
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants