moon icon indicating copy to clipboard operation
moon copied to clipboard

Add moonx binary entry to package.json

Open jamestalmage opened this issue 4 months ago • 4 comments

Link moonx for folks who install via a node package manager.

jamestalmage avatar Nov 24 '25 18:11 jamestalmage

@jamestalmage I actually had this before but it breaks the moon binary, since npm is dumb and doesn't know what the "default" bin is anymore.

npm's logic is stupid, as the default bin name === the package name, and since the package name isn't "moon" this won't work.

milesj avatar Nov 24 '25 18:11 milesj

I'm doing this (installing multiple binaries) in internal command line packages, and it works fine in npm 11.2

jamestalmage avatar Nov 24 '25 18:11 jamestalmage

Confirmed that this works for moon.

npm install @jamestalmage/moonrepo-cli

Running moonx gives expected results

image

jamestalmage avatar Nov 24 '25 18:11 jamestalmage

I wonder if they fixed this in latest npm. Will need to also verify older versions of npm, and then pnpm/yarn.

milesj avatar Nov 24 '25 19:11 milesj