Update babel-core dependency to v7 for jest-config #6926
Closed
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.
Resolves #6913
Summary
I was seeing the same error as reported in #6913. I had
[email protected]
installed locally. I noticed that inside mynode_modules/jest-config
directory, it installed[email protected]
inside itsnode_modules
. I traced this back to thepackage.json
file specifying"babel-core": "^6.0.0"
which does not allow for usage of[email protected]
, so npm will install the latest 6.* version ofbabel-core
. When you run your tests, you get the same error as seen in #6913.If you have
[email protected]
installed in yourpackage.json
, this will still be ignored by jest-config as it installs an older version.Test plan
Using npm version 6.1.0, download
jest
vianpm install jest --save-dev
. Install[email protected]
as well. Dig throughnode_modules/jest-config/node_modules
to see if it installed v6.26.3 ofbabel-core
.