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

Error in prebuild process: Unable to resolve dependency tree #1

Closed
blasferna opened this issue Oct 1, 2022 · 3 comments
Closed

Error in prebuild process: Unable to resolve dependency tree #1

blasferna opened this issue Oct 1, 2022 · 3 comments

Comments

@blasferna
Copy link

The log output.

 Creating native project directories (./ios and ./android) and updating .gitignore

✔ Created native project | gitignore skipped

- Adding Metro bundler config

✔ Added Metro config

- Updating your package.json scripts, dependencies, and main file

✔ Updated package.json and added index.js entry point for iOS and Android

› Removed "main": "node_modules/expo/AppEntry.js" from package.json because we recommend using index.js as main instead

- Config syncing

[stderr] Using node to generate images. This is much slower than using native packages.

[stderr] › Optionally you can stop the process and try again after successfully running `npm install -g sharp-cli`.

- Config syncing

[stderr] » android: userInterfaceStyle: Install expo-system-ui in your project to enable this feature.

- Config syncing

✔ Config synced

Running "npm install" in the root dir of your repository 

[stderr] npm ERR!

[stderr] code ERESOLVE

[stderr] npm

[stderr] ERR! ERESOLVE unable to resolve dependency tree

[stderr] npm ERR!

[stderr] npm ERR! While resolving: build@1.0.0

[stderr] npm

[stderr] ERR! Found: react@18.0.0

[stderr] npm ERR! node_modules/react

[stderr] npm ERR!   react@"18.0.0" from the root project

[stderr] npm ERR! 

[stderr] npm ERR! Could not resolve dependency:

[stderr] npm ERR!

[stderr] peer react@"17.0.2" from react-native@0.68.2-7

[stderr] npm ERR! node_modules/react-native

[stderr] npm ERR!   react-native@"npm:react-native-tvos@0.68.2-7" from the root project

[stderr] npm ERR! 

[stderr] npm ERR! Fix the upstream dependency conflict, or retry

[stderr] npm ERR! this command with --force, or --legacy-peer-deps

[stderr] npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

[stderr] npm ERR! 

[stderr] npm ERR! See /home/expo/.npm/eresolve-report.txt for a full report.

[stderr] 

[stderr] npm ERR! A complete log of this run can be found in:

[stderr] npm ERR!     /home/expo/.npm/_logs/2022-10-01T14_50_46_242Z-debug.log

npm exited with non-zero code: 1
@abdullahceylan
Copy link
Owner

I have tried with a couple of fresh repo and didn't see any issue. Can you let me know which node version you use? Also, if you can create a repo to reproduce the issue, I can check. Otherwise, it seems related to your environment.

@blasferna
Copy link
Author

blasferna commented Oct 4, 2022

The error appears when executing: eas build for android.

The executed command:

eas build -p android --profile preview

I tried with a new repository that is this one, but the error still appears.

My node version is v14.18.3

@abdullahceylan
Copy link
Owner

So, actually, this is not related to this repo but related to the one you forked and modified? I see that your template still has react-native package itself rather than the correct react-native-tvos package.

I have tried using this repo as a template and the result was successful. You can find the output below:

yarn run v1.22.17
$ /home/expo/workingdir/build/node_modules/.bin/expo prebuild --template https://github.com/abdullahceylan/expo-template-bare-minimum-tvos --no-install --platform android
- Creating native project directories (./ios and ./android) and updating .gitignore
✔ Created native project | gitignore skipped
- Adding Metro bundler config
› Metro skipped: Project metro.config.js does not match prebuild template.
› Ensure the project uses @expo/metro-config.
  Learn more: https://docs.expo.dev/guides/customizing-metro
- Updating your package.json scripts, dependencies, and main file
✔ Updated package.json and added index.js entry point for iOS and Android
- Config syncing
[stderr] Using node to generate images. This is much slower than using native packages.
[stderr] › Optionally you can stop the process and try again after successfully running `npm install -g sharp-cli`.
- Config syncing
✔ Config synced
Done in 5.01s.
Running "yarn install" in the root dir of your repository 
yarn install v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[stderr] warning "expo-splash-screen > @expo/prebuild-config@5.0.3" has unmet peer dependency "expo-modules-autolinking@>=0.8.1".
[stderr] warning " > react-native@0.68.2-7" has incorrect peer dependency "@types/react-native@^0.63.17".
[stderr] warning " > react-native@0.68.2-7" has incorrect peer dependency "react@17.0.2".
[stderr] warning "react-native > react-shallow-renderer@16.14.1" has incorrect peer dependency "react@^16.0.0 || ^17.0.0".
[stderr] warning "react-native > use-subscription@1.5.1" has incorrect peer dependency "react@^16.8.0 || ^17.0.0".
[stderr] warning "react-native > react-native-codegen > jscodeshift@0.13.1" has unmet peer dependency "@babel/preset-env@^7.1.6".
[stderr] warning " > react-native-progress@5.0.0" has unmet peer dependency "react-native-svg@*".
[stderr] warning " > @react-native-community/eslint-config@3.1.0" has unmet peer dependency "prettier@>=2".
[stderr] warning "@react-native-community/eslint-config > eslint-plugin-prettier@4.2.1" has unmet peer dependency "prettier@>=2.0.0".
[stderr] warning " > eslint-import-resolver-babel-module-alias@1.5.1" has unmet peer dependency "babel-plugin-module-alias@1.x".
[stderr] warning "reactotron-react-native > react-native-flipper@0.34.0" has incorrect peer dependency "react@^16.8.1".
[stderr] warning "reactotron-react-native > react-native-flipper@0.34.0" has incorrect peer dependency "react-native@^0.62.0".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 8.68s.

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

No branches or pull requests

2 participants