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

unable to resolve dependency tree in all circumstances. #827

Open
switch-to-gitlab opened this issue Feb 1, 2025 · 7 comments · May be fixed by rescript-react-native/rescript-react-native.github.io#32

Comments

@switch-to-gitlab
Copy link

Helllo,

This package is not installable as far as I can tell. I have tried the following ways:

Using the template

This is the command found on the website:

npx @react-native-community/cli init --template @rescript-react-native/template MyApp

This is the output of that command (under the emoji art)

✔ Downloading template
✔ Copying template
✔ Processing template
ℹ Executing post init script 
You are now ready to use ReScript React Native. Be sure to check the docs at https://rescript-react-native.github.io/
⠧ Installing dependencies

error An unexpected error occurred: Command failed with exit code 1: npm install
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react
npm error   react@"17.0.1" from the root project
npm error   peer react@">=16.8.1" from @rescript/[email protected]
npm error   node_modules/@rescript/react
npm error     @rescript/react@"^0.10.0" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react@"^19.0.0" from [email protected]
npm error node_modules/react-dom
npm error   peer react-dom@">=16.8.1" from @rescript/[email protected]
npm error   node_modules/@rescript/react
npm error     @rescript/react@"^0.10.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /home/el/.npm/_logs/2025-02-01T02_24_34_831Z-eresolve-report.txt
npm error A complete log of this run can be found in: /home/el/.npm/_logs/2025-02-01T02_24_34_831Z-debug-0.log.

Installing the dependency itself even when no other dependencies are present

This command installs the package to a brand new node project and attempts to install rescript-react-native in a clean environment

mkdir MyApp && cd MyApp && npm init -y && npm i rescript-react-native

It fails with the same error but with slightly different numbers.

Wrote to /home/el/workbench/MyApp/package.json:

{
  "name": "myapp",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "description": ""
}



npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/react
npm error   peer react@">=18.0.0" from @rescript/[email protected]
npm error   node_modules/@rescript/react
npm error     peer @rescript/react@">=0.12.0" from [email protected]
npm error     node_modules/rescript-react-native
npm error       rescript-react-native@"*" from the root project
npm error   peer react@"^19.0.0" from [email protected]
npm error   node_modules/react-dom
npm error     peer react-dom@">=18.0.0" from @rescript/[email protected]
npm error     node_modules/@rescript/react
npm error       peer @rescript/react@">=0.12.0" from [email protected]
npm error       node_modules/rescript-react-native
npm error         rescript-react-native@"*" from the root project
npm error
npm error Could not resolve dependency:
npm error peer react@"^18.2.0" from [email protected]
npm error node_modules/react-native
npm error   peer react-native@">=0.75.0" from [email protected]
npm error   node_modules/rescript-react-native
npm error     rescript-react-native@"*" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /home/el/.npm/_logs/2025-02-01T02_31_04_367Z-eresolve-report.txt
npm error A complete log of this run can be found in: /home/el/.npm/_logs/2025-02-01T02_31_04_367Z-debug-0.log
@switch-to-gitlab
Copy link
Author

@MoOx I went ahead and put a bounty on this issue because I appreciate the work here and want it to succeed. https://app.opire.dev/issues/01JJZPGZPE4MGKQEWBVBQZBJX8

@EDLLT
Copy link

EDLLT commented Feb 2, 2025

@switch-to-gitlab can you test my solution found here
rescript-react-native/rescript-react-native.github.io#32

@switch-to-gitlab
Copy link
Author

@EDLLT Ah, I'll bet that works. Thanks. I probably won't have time to test it out today or tomorrow but Tuesday and Wednesday look promising.

@switch-to-gitlab
Copy link
Author

switch-to-gitlab commented Feb 5, 2025

@EDLLT Okay yeah that worked. Are you able to claim the money through Opire or would you like me to pay you some other way? This is the first issue I've bountied so I'm a little unfamiliar with the process and I'm not sure if the software will accept a PR link to a different repo.

@EDLLT
Copy link

EDLLT commented Feb 5, 2025

@EDLLT Okay yeah that worked. Are you able to claim the money through Opire or would you like me to pay you some other way? This is the first issue I've bountied so I'm a little unfamiliar with the process and I'm not sure if the software will accept a PR link to a different repo.

Great to hear that!
I've noticed that opire doesnt accept that PR link as well
Can you do it via PayPal instead?
My PayPal email:

[email protected]

Here's a paypal invoice if you don't have a paypal account(which accepts credit cards directly)
https://www.paypal.com/invoice/p/#INV2-E2FY-ZP7G-HU97-NDQH

@switch-to-gitlab
Copy link
Author

@EDLLT You should have received a payment for the workaround.

I'll leave the Opire bounty up and this issue open in case one of the maintainers wants to fix it in this repo.

@KartikeyNamdev
Copy link

I can fix it in the repo, but can i claim the bounty ??

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

Successfully merging a pull request may close this issue.

3 participants