Run yarn during ejecting to avoid hoisting issues and fix CI #3806
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Our CI started failing, possibly after Jest released a 21.1.0 update.
After chatting to @BYK our best guess is that because we didn't re-run Yarn after ejecting, the new script location (in the root
/scriptsfolder rather than innode_modules/react-scripts/scripts) started picking up a differentbabel-coreversion that was previously being hoisted (6.x judging by the stack trace that has/lib/in it) than the onereact-scriptswanted (7.0 bridge).Our current behavior always seemed weird to me (#3356), and now that it's possibly causing bugs, I think we should try getting rid of that special case. Perhaps those issues in the TODO are not relevant anymore, or maybe we can find better fixes for them. Conceptually re-running yarn sounds like the only right thing to do.
I'm kind of shooting in the dark here so I also tried to update other Jest packages while we're at it.