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

ERESOLVE unable to resolve dependency tree Found: @babel/core@7.9.6 and peer @babel/core@"^7.13.0" #14532

Closed
ankitmaloo opened this issue Sep 27, 2021 · 2 comments
Labels
needs validation Issue needs to be validated

Comments

@ankitmaloo
Copy link

Summary

Trying to install after upgrading to expo 42, but it gives errors with babel plugin. specifically these two:

Could not resolve dependency:
npm ERR! peer @babel/core@"^7.13.0" from @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.15.4

ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: @babel/core@7.9.6
npm ERR! node_modules/@babel/core
npm ERR! dev @babel/core@"~7.9.6" from the root project
npm ERR! @babel/core@"^7.0.0" from metro-react-native-babel-transformer@0.59.0

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

Android, iOS

SDK Version (managed workflow only)

42

Environment

NPM Version: 7.17.0

Expo CLI 4.10.0 environment info:
System:
OS: macOS 11.2.3
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 16.1.0 - /usr/local/bin/node
npm: 7.17.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.7, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
IDEs:
Android Studio: 4.2 AI-202.7660.26.42.7351085
Xcode: 11.7/11E801a - /usr/bin/xcodebuild
npmGlobalPackages:
expo-cli: 4.10.0
Expo Workflow: managed

Reproducible demo or steps to reproduce from a blank project

I can give you package.json which would help given everything is installed from there.

"devDependencies": {
"@babel/core": "~7.9.6"
},

@ankitmaloo ankitmaloo added the needs validation Issue needs to be validated label Sep 27, 2021
@byCedric
Copy link
Member

Hi @ankitmaloo! Thanks for writing in, unfortunately, this is a known issue with npm 7. With that version, npm decided to enforce installing peer dependencies again. This is something they tested in npm 2, but rolled back due to issues. This time it's causing issues again, as you can see here.

You should be able to install with npm install --legacy-peer-deps or use yarn install.

Hope this helps!

@ankitmaloo
Copy link
Author

Hey,

Thanks for the answer. I did that and it worked atleast with babel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs validation Issue needs to be validated
Projects
None yet
Development

No branches or pull requests

2 participants