Repository navigation
unable to resolve dependency tree in all circumstances. #827
Copy link
Copy link
Closed
rescript-react-native/rescript-react-native.github.io
#32Description
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 MyAppThis 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: myapp@0.0.1
npm error Found: react@17.0.1
npm error node_modules/react
npm error react@"17.0.1" from the root project
npm error peer react@">=16.8.1" from @rescript/react@0.10.2
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 react-dom@19.0.0
npm error node_modules/react-dom
npm error peer react-dom@">=16.8.1" from @rescript/react@0.10.2
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-nativeIt 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: myapp@1.0.0
npm error Found: react@19.0.0
npm error node_modules/react
npm error peer react@">=18.0.0" from @rescript/react@0.13.0
npm error node_modules/@rescript/react
npm error peer @rescript/react@">=0.12.0" from rescript-react-native@0.75.0
npm error node_modules/rescript-react-native
npm error rescript-react-native@"*" from the root project
npm error peer react@"^19.0.0" from react-dom@19.0.0
npm error node_modules/react-dom
npm error peer react-dom@">=18.0.0" from @rescript/react@0.13.0
npm error node_modules/@rescript/react
npm error peer @rescript/react@">=0.12.0" from rescript-react-native@0.75.0
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 react-native@0.77.0
npm error node_modules/react-native
npm error peer react-native@">=0.75.0" from rescript-react-native@0.75.0
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.logReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
switch-to-gitlab commentedon Feb 1, 2025
@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 commentedon 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 commentedon Feb 2, 2025
@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 commentedon 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.
switch-to-gitlab commentedon Feb 5, 2025
@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 commentedon Mar 11, 2025
I can fix it in the repo, but can i claim the bounty ??
Freddy03h commentedon May 15, 2025
@switch-to-gitlab
In a react-native project you should specify a fixed
reactandreact-nativeversion in your package.json(example : migration from 0.77 to 0.78)
Then choose the
@rescript/reactandrescript-react-nativeaccording to yours react and react-native versions.You shouldn't get issue if you follow these rules. But, if still get a relative issue, you can specify
overridesversions in your package.json for npm : npm overrides orresolutionsfor yarn : yarn resolutions