I've got trouble when trying to link a commant to a javascript file with npm on a linux machine. Just assume some simple script and package.json:
package.json
"bin": {
"test": "./test.js"
},
test.js
#!/usr/bin/env node
console.log("test");
installation
$ sudo npm install
$ sudo npm link
Doing this on a windows machine causes no problems. Everything works fine. But on a linux / Raspbian system it keeps telling me:
: no such file or directory
I have already linked the binaries of node with:
$ sudo ln -s /usr/bin/nodejs /usr/bin/node
And to be sure, I've updated to the latest version of node, 7.10.0. But nothing helps. The message still appears. I have no idea whats wrong ...
which testand`which test` (including backticks)/usr/bin/testand second shows: no such file or directory.