Thinkmill / manypkg

☔️ An umbrella for your monorepo
MIT License
884 stars 48 forks source link

Does this work with npm? #97

Open reintroducing opened 3 years ago

reintroducing commented 3 years ago

Hello, We don't use yarn, rather npm, and for the most part this works. However, at times when I run manypkg fix, I get the following:

> manypkg fix

☔️ error Error: spawn yarn ENOENT
☔️ error     at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19)
☔️ error     at onErrorNT (node:internal/child_process:480:16)
☔️ error     at processTicksAndRejections (node:internal/process/task_queues:83:21) {
☔️ error   errno: -2,
☔️ error   code: 'ENOENT',
☔️ error   syscall: 'spawn yarn',
☔️ error   path: 'yarn',
☔️ error   spawnargs: []
☔️ error }

It seems that under the hood this wants to use yarn but since I don't have it installed its erroring. Is it possible to get away from this?

flybayer commented 2 years ago

Yeah this is a unexpected problem.

Workaround is to manually fix things, which defeats the purpose of manypkg fix

steve-taylor commented 2 years ago

NPM was a bit late to the monorepo party, so understandably it's currently unsupported. I hope this changes soon.

tomdavidson commented 2 years ago

Would a PR using something like yarpm or preferred-pm be welcomed?

BenJackGill commented 1 year ago

+1 for this.

I am having the same problems.

npm support would be welcome.

Andarist commented 1 year ago

It would be great if somebody could locate where the error is coming from. This is likely an easy fix.