-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Browserslist error #7239
Comments
Same issue for the same versions of node and npm |
Same issue with me |
Same issue for Npm -v : 6.9.0 |
yep - same issue. what we gonna do? |
Same here. |
may be we just downgrade version of browserlist to 4.6.1? |
@epicbytes don't we need to eject CRA for that? |
i don |
same issue |
Same issue |
If you want to pin browserslist version, pin it to 4.6.0. |
We're having the same issue here. Halp. 😞 |
same issue 🙋 |
Browserslist 4.6.0 still raises same error to me. |
Same issue for : |
Same issue for : |
Same issue for : |
1 similar comment
Same issue for : |
Same issue:
|
Same issue: node v 10.16.0 |
Same issue: |
Same issue node v v10.13.0 |
Same issue |
Same here |
same here |
Same issue |
same issue |
Same issue... |
Same issue. |
how do fix this issue? |
@liSong5713 Temporary solution:
|
temporary solution: // package.json
"resolutions": {
"browserslist": "4.6.2",
"caniuse-lite": "1.0.30000974"
}, maybe you can use umijs, it is not affected. |
This looks like a repeat of what the angular team ran into some time ago. Came to report left with a solution. Thank you! @jaywcjlove @4Eric |
It looks like How it worked: More or less, caniuse stats are provided as an object of features, like For example, one tree of features might look like What changed: Within the This means one tree of features might look like That is how the |
Didn't help with |
Try it stuff:
There is some help. |
@umyar, that didn't help. Adding that actuall fails my build with the following message:
|
This guy has the fix browserslist/browserslist#382 (comment). Just tried and it works. |
OH BOY! what a dumpster fire. This broke my 2.1.8 build. Can't get those 8 hours back.... I 100% understand that the blame here is distributed, but I still am considering ejecting and/or migrating away from react-scripts entirely. I can't help but wonder which one of the dependencies will break next. There are over 50 direct dependencies in package.json when i eject a fresh project, and node_modules has around 1000 folders in it. Is this REALLY the way to use react? Also the only thing that worked for me was settings |
don't work |
remove browserslist item, only set caniuse-lite, it worked for me. plus, you should use yarn or install npm-force-resolutions. |
@zechau you can use |
@ycjcl868 gotcha. |
Any level of testing should have caught this, that is the contract cost of using dependancies. I hate to ask or look since I know what I'm getting isn't what I'll actually use when I care about the content I'm making, but do you need help developing better tests? This project is a nice relief for dealing with rolling changes in this bloated ecosystem. I'm confident if it needs to happen the community will come together to make sure this doesn't happen again. It could have been any subdep changes that didn't crash getting into your npm release. |
@ai @jonathantneal builds seem to be succeeding now, since the latest update to caniuse-lite from 5 hours ago. Thank you. |
@timurmamedov, yes, the I used this rudimentary test to compare v1.0.30000975 and v1.0.30000976: // present in 1.0.30000975, removed in 1.0.30000976
caniuse.feature(caniuse.features['prefers-color-scheme']).stats.android.all Looking at the most recent commits to caniuse-lite, it appears this change was most likely made within caniuse-db, and not patched in caniuse-lite. This is great news for all projects affected by the @etisdew, if I managed caniuse, which merely exports a collection of function-less JSON files, I might not be prepared to test for every way other projects have chosen to use my files. If you think more tests are needed, you must produce a sufficient JSON schema and submit the PR to caniuse-db — I believe that is the contract cost of complaining about open source. 😉 |
I just tried it on my projects and it seems the issue is resolved. |
@jonathantneal I only feel empathy for the situation in which another repository is able to affect its downstream users. From a learning perspective what is the best way of managing and remediating dependancys and the possibility of dependency divergence? Rollback and lock until stable? Find/build alternatives? My major concern is malicious injection through strategic compromise and the dangers of rolling dependencies. I know that in any sizable form they would be obvious and found in review but on the state of the culture, the idea of manually disabling an execution context from human input grows harder and harder in the context of an automated pipeline not using strict version semantics and open source suffering from non-viable donation models to give the time and attention where it deserves to be. Keep fighting the good fight, but I would be interested to learn more about how to handle these issues, isolating ones own project from them without going full hermit. |
@etisdew we already discussing solution in |
@ai and all the other devs in create-react-app. THANK YOUUUU. I REALLY dont wanna eject, nor migrate, nor deal w/ the crap ya'll deal with. This also highlights the absurdity that we deal w/ in the first place. The dependency-heavy-environment that we navigate is a result of the browser devs (read as Google/Firefox/Apple as orgs, NOT the engineers) lack of standards and coherency. As endusers its super easy to place blame, CRA, or browserslists, or postcss-preset-env. The reality is that NONE of these would have to exist if the browser wasn't a giant flaming turd to develop on. Thank you for propping up our shit env with your tools. Now, what can we do to help avoid this? EDIT: this=mitigating upstream dependencies breaking builds. It TERRIFIES me that 1/900+ dependencies can potentially BREAK a production build. |
Question is definitely off topic... I am not even talking about this browserslists fiasco. As a user of CRA, what kind of confidence can I have in this going forward that this wont just randomly break? |
I apologize for OT and discussion, I have to second the comment thanking you and all developers in the pipeline we have to manage everyday. You save me hours and headaches. Open source is a beautiful thing aswell. Issue seems to be largely closed yes? @derek-adair |
Yeap, this issue can be closed here. We in separated issue are finding solution to prevent problems on similar case in the future. |
That's what the package lock file prevents. Closing this issue for now as it appears to be resolved. Will leave pinned for a couple days in case anyone is still running into this issue. |
This broke a stable project on CRA 2.1.8. With said lock file, I was getting a warning saying to update caniuse-lite and browserslist. I did not update or change any deps; I woke up to builds failing. I'd be happy to provide yarn.lock if useful. |
@derek-adair please file a new issue with commands your build ran and errors you saw. Also results to "yarn why caniuse-lite" |
Hello, i just used 'npx create-react-app project-name' and when im starting my project im getting this error:
/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 ()
at Array.some ()
at Array.filter ()
Npm -v : 6.9.0
Node -v : v10.16.0
The text was updated successfully, but these errors were encountered: