So I made a cli with package.json
that specifies a bin file.
I npm link
'd it. Then I created a new folder on my desktop and npm link foocli
which installed it fine to that directory's node_modules
folder.
Then I try to run the cli from that dir and it throws:
The file '/usr/local/bin/foocli' is marked as an executable but could not be run by the operating system.
Any idea what's causing this and how I can fix it?
#!/usr/bin/env node
is needed at the top of the file that is being executed so the shell knows how to execute the file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With