wclr / yalc

Work with yarn/npm packages locally like a boss.
MIT License
5.52k stars 146 forks source link

Cannot install with Node 16 (upath) #199

Open AndersDJohnson opened 2 years ago

AndersDJohnson commented 2 years ago
yarn global add yalc

yarn global v1.22.10 [1/4] 🔍 Resolving packages... [2/4] 🚚 Fetching packages... error upath@1.0.4: The engine "node" is incompatible with this module. Expected version ">=4 <=9". Got "16.3.0" error Found incompatible module.

AndersDJohnson commented 2 years ago

Seems like this was fixed in upath at some point: https://github.com/anodynos/upath/commit/8c5f4e10376ed1cd4553d9432297d39a34410c69#comments

Is this out of sync in the transitive dependency chain?

AndersDJohnson commented 2 years ago

Workaround for now:

yarn global add yalc --ignore-engines
james-arawhanui commented 1 year ago

Working ok for me without --ignore-engines

$ node --version
v16.18.0

But I came here because I couldn't install, but since found that I had to add sudo before commands

sudo yarn global add yalc

#from upstream project
sudo yalc publish

# from consuming project
sudo yalc add "@upstream/package"

seems a bit overkill and using sudo is a bit iffy 😢 but it appears to be working...

Interested to hear what I'm doing wrong

EDIT: sudo is a horrible idea. Package doesn't get updated properly. EDIT2: This solved my issue with the install