Post

Oof, I feel like I always get caught out that pnpm happily runs Node CLI scripts without the hashbang at the top but npm throws an error. If I haven’t set it up correctly: pnpm create … ✅ works npm create … ❌ fails

In practice, I'm unable to find a usecase where you'd want to have a hashbang though. Shouldn't you just use the global node executable? Since we can just override `$PATH` and tell it to pick the node binary from wherever we want, we shouldn't need the hashbang.

0 reposts0 likes

No replies yet.