manypkg icon indicating copy to clipboard operation
manypkg copied to clipboard

Does this work with npm?

Open reintroducing opened this issue 4 years ago • 5 comments
trafficstars

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?

reintroducing avatar May 13 '21 16:05 reintroducing

Yeah this is a unexpected problem.

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

flybayer avatar Dec 06 '21 17:12 flybayer

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

steve-taylor avatar Mar 08 '22 06:03 steve-taylor

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

tomdavidson avatar Jun 28 '22 20:06 tomdavidson

+1 for this.

I am having the same problems.

npm support would be welcome.

BenJackGill avatar Mar 14 '23 08:03 BenJackGill

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

Andarist avatar Mar 14 '23 09:03 Andarist