Unable to resolve dependency tree when running `npm install`
scottdlai opened this issue · 5 comments
I created a project by running bsb -init rescript-test -theme react-hooks
from the Getting Started Guide
Output
$ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: bs-platform@8.4.2
npm ERR! node_modules/bs-platform
npm ERR! dev bs-platform@"^8.4.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! reason-react@">=0.7.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: bs-platform@7.3.2
npm ERR! node_modules/bs-platform
npm ERR! peer bs-platform@"^7.1.1" from reason-react@0.9.1
npm ERR! node_modules/reason-react
npm ERR! reason-react@">=0.7.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /Users/scott/.cache/npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/scott/.cache/npm/_logs/2021-01-08T05_22_17_514Z-debug.log
Environment
npm: 7.3.0
node: v15.5.0
bsb: 8.4.2
OS: MacOS Big Sur 11.1
Thanks :D
Here's the package.json file:
{
"name": "rescript-test",
"version": "0.1.0",
"scripts": {
"build": "bsb -make-world",
"start": "bsb -make-world -w -ws _ ",
"clean": "bsb -clean-world",
"server": "moduleserve ./ --port 8000",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [
"BuckleScript",
"ReasonReact",
"reason-react"
],
"author": "",
"license": "MIT",
"dependencies": {
"react": "^16.8.1",
"react-dom": "^16.8.1",
"reason-react": ">=0.7.1"
},
"devDependencies": {
"bs-platform": "^8.4.2",
"moduleserve": "^0.9.0"
}
}
Hey, new ReasonReact user here, I run into similar problem (MacOS Big Sur 11.1, npm 7.0.15, node v15.4.0, bsb 8.4.2).
As a workaround, I resolved dependencies by running this in the project:
npm i -D bs-platform@"^7.1.1"
.
BTW, on Linux with npm 6.14.6, node v14.6.0, bsb 8.4.2 it npm install
s fine.
This is not good for the platform, have any contributors actually looked into this?
Released a new version (0.10.0) that should fix any installation issue with latest bs-platform (v9). Let me know if you find any issues and will try to fix them.
Thanks for reporting those and sorry for the late response/fix.