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

Typo in query error #571

Closed
leepowelldev opened this issue Dec 30, 2020 · 7 comments
Closed

Typo in query error #571

leepowelldev opened this issue Dec 30, 2020 · 7 comments

Comments

@leepowelldev
Copy link

Please forgive me if I'm doing something wrong, but running this example from the readme:

npx browserslist "> 1%, IE 10"

Results in: browserslist: Unknown browser query 10. Maybe you are using old Browserslist or made typo in query.

I've tried numerous things like installing browserslist globally and updating the db ... every time I seem to get the same.

@ai
Copy link
Member

ai commented Dec 30, 2020

Maybe you have a newline after IE or some another symbol, which looks like space but is not a real space?

@leepowelldev
Copy link
Author

Sadly not, just tried typing it out again from scratch and same error...

@ai
Copy link
Member

ai commented Dec 30, 2020

It is some strange npx issue in the latest npm. It removed " in query and send [">", "1%,", "IE", "10"] to Browserslist in process.argv instead of ["> 1%, IE 10"].

Can you create an issue in npm?

@ai
Copy link
Member

ai commented Dec 30, 2020

Quick solution: call npx browserslist in the project where you have local Browserslist in package.json

@leepowelldev
Copy link
Author

Bug report is already open at npm - have referenced.

@ai ai closed this as completed Dec 30, 2020
@ai
Copy link
Member

ai commented Dec 30, 2020

Thanks. Hope they will fix it quickly. Very painful big for the community.

@leepowelldev
Copy link
Author

leepowelldev commented Dec 30, 2020

Sure, hopefully shouldn't impact many as most users are probably still on v6

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

2 participants