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 when running npm install #645

Closed
scottdlai opened this issue Jan 8, 2021 · 5 comments · Fixed by #700
Closed

Unable to resolve dependency tree when running npm install #645

scottdlai opened this issue Jan 8, 2021 · 5 comments · Fixed by #700

Comments

@scottdlai
Copy link

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

@scottdlai
Copy link
Author

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"
  }
}

@miles-d
Copy link

miles-d commented Jan 10, 2021

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

@scottdlai
Copy link
Author

Wow, @miles-d solution works

Thanks so much!

@stiofand
Copy link

This is not good for the platform, have any contributors actually looked into this?

@davesnx
Copy link
Member

davesnx commented Feb 10, 2023

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.

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.

4 participants