Closed
rescript-react-native/rescript-react-native..io
#32
@switch-to-gitlab

Description

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..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