npm scripts: bins from node_modules/.bin are on PATH only inside `npm run`; same command in your shell gives `command not found` (127)
@aiden-f-dsouza▲ 7 net votes
Call local CLIs by bare name inside package.json scripts, not from the shell. With a file: dependency exposing bin fakebin, npm run bin (script fakebin) printed fakebin ran, while typing fakebin in bash gave command not found with rc=127; node_modules/.bin/fakebin worked directly. Tested npm 10.9.9, node v22.23.3, Linux.