-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Revisit dependency pinning #6756
Comments
Here's an example we get a preflight warning in our CI. We noticed this quite a bit the last few days as Jest has released a few new versions in quick succession. Each new release would break CI. This is an example
However when a new version of jest comes out, let's say What would happen during |
The preflight check folder is |
Jest 24.8.0 breaks it again. When I run
The error went away after I changed |
Suffering from the very same issue. Any CRA made this morning fails to start because of 24.8.0 in babel-jest. Same output as @yuchuan1 |
add a version resolutions into
|
Ran into same problem today. |
Resolutions didn't work for me. Any other ideas on a work around? I'm using Yarn so that might have something to do with it, but I've tried with npm as well and that just hangs at starting before it finally dies with an allocation failure. |
Also getting this with webpack |
@jdarling To run the server, as a workaround, I've been using the following command. My guess is that any command that fails you can just add
|
Everything mentioned above results in:
Or some variant for me. Last week same code no problem, this week everything is broke. |
Ok, if anyone else is still suffering make sure you delete your node_modules folder, yarn.lock (or package-lock.json) file, and clear your cache. yarn cache clear (in my case). Then do a clean install. Unfortunately for those of us on 3rd world internet connections that can mean hours of waiting. Thanks for forcing jest down our throats and not locking versions down so it could screw us. |
That is a very unfair and unproductive statement. Most of our users are very happy with Jest. You are also free to use your own testing framework and/or eject if needed. We are locking dependency versions down in CRA in almost all cases. However we can't control how our dependencies reference other dependency versions, and in some cases we end up in these scenarios (which we are addressing). Also keep in mind that this project is mostly maintained by the community. We contribute to this project outside of our day jobs as it is something we're passionate about and love doing. Please keep the comments polite and constructive. Thanks! |
Inflammatory yes, very unfair and unproductive, not at all. Can I install or use create-react-app without having Jest installed even though I don't use Jest, nope (statement is accurate and thus fair). On more than one occasion has Jest broke backward compatibility by not following semantic versioning rules, yes (statement is backed by historic evidence, provokes a response and thus is productive). The testing package should be a dependency that acts as an addon like everything else, not a default. My statement is completely accurate and I stand by it. |
It is not unfair or unproductive - it just puts the finger in the wound. Jest and React are developed by Facebook and I strongly recommend an inhouse NPM registry powered CI pipeline to run against ALL projects such as Yarn, Jest, React etc. before you guys deploy to the public registry and break thousands of projects and builds. I did a little "kind of stupid" math but it shows the scope:
|
This project isn't Jest or React and none of the maintainers of Create React App work at Facebook. We are all volunteers working on this project in our spare time. |
Pinning all of our dependencies causes issues with the preflight check whenever a new version of a nested dependency is released.
babel-jest
is one example of this. When a new version is released and used by another dependency the preflight check fails until we update our version to match.We should consider unpinning certain dependencies like
babel-jest
and updating the preflight check to work with carrot versions like^24.7.1
. It currently only works with exact version numbers.The text was updated successfully, but these errors were encountered: