Do you have a bin entry in your package.json? See docs here: https://docs.npmjs.com/cli/v10/configuring-npm/package-json#bin
bin
package.json