twosigma / git-meta

Repository for the git-meta project -- build your own monorepo using Git submodules
http://twosigma.github.io/git-meta
BSD 3-Clause "New" or "Revised" License
216 stars 50 forks source link

fail to install git-meta in ubuntu focal #852

Closed xinnjie closed 2 years ago

xinnjie commented 2 years ago

Hi, guys. I followed instruction below, run as root, in ubuntu focal

$ git clone https://github.com/twosigma/git-meta.git
$ cd git-meta/node
$ npm install -g

npm complain like this

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: git-meta@0.4.0
npm ERR! Found: nodegit@0.25.1
npm ERR! node_modules/nodegit
npm ERR!   nodegit@"^0.25.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer nodegit@"^0.18.0" from git-range@0.2.0
npm ERR! node_modules/git-range
npm ERR!   git-range@"" 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 /root/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-12-17T08_54_24_401Z-debug.log

I know very little about js and npm. But git-range version looks very strange

Thanks in advance.

shijinglu commented 2 years ago

what is your node version? I'd suggest you install nvm and use node.js 8.x version

xinnjie commented 2 years ago

what is your node version? I'd suggest you install nvm and use node.js 8.x version

> node --version
v16.13.0

node version is 16.13. I tried 8.10.0, problem solved! Thanks!