NodeJS programs crash, exit without output
2 answers
The problem was that I had a package called "node - Node Amateur Packet Radio Program (Transitional Package)" (note: this is NOT nodejs):
$ dpkg -l | grep node ii ax25-node 0.3.2-7.4 amd64 Amateur Packet Radio Node program ii node 0.3.2-7.4 amd64 Amateur Packet Radio Node program ii nodejs 0.10.32-1chl1~trusty1 amd64 Node.js event-based server-side javascript engi
This binary is in /usr/bin/node
, but some programs nodejs
expect to find binary here nodejs
.
The trick is to remove the package node
and then reinstall nodejs
:
$ sudo apt-get purge node nodejs # Uninstall both
$ sudo apt-get install nodejs # Reinstall nodejs
Now the binary /usr/bin/node
should be linked with nodejs
(somewhat workaround):
$ ls -l /usr/bin/node /etc/alternatives/node
lrwxrwxrwx 1 root root 15 Sep 18 15:57 /etc/alternatives/node -> /usr/bin/nodejs
lrwxrwxrwx 1 root root 22 Sep 18 15:57 /usr/bin/node -> /etc/alternatives/node
And your nodejs programs should now work correctly:
$ npmunbox --help
npmunbox - Extracts a .npmbox file and installs the contained package.
...
$ grover --version
0.1.17
+4
source to share