Justification: renders package unusable
Attempting to use many programs installed with `npm install` fails before
execution because the Node.js interpreter installed by dpkg/synaptic is not at
the expected path. The node binary is named 'nodejs' on Debian, but the node
community expects the de-facto standard of '#!/usr/bin/env node'.
be run like a shell script, and does not have the heritage of many other Linux
shell languages. Additionally, it is unclear from the Node.js project what the
official name of the binary should be. That said, here are the accepted
shebangs for some other interpreters:
All references to node shebangs I can find on the internet converge on
#!/usr/bin/env node which is why this issue prevents many npm packages to fail
* What exactly did you do (or not do) that was effective (or
Creating a symlink as root: /usr/bin/node -> /usr/bin/nodejs solves the issue
as far as I can tell.
ln -s -T /usr/bin/nodejs /usr/bin/node && chmod 755 /usr/bin/node
A quick search of the Sid repositories doesn't show any conflicts with files
installing to the path /usr/bin/node so doing the simple symlink within the
Debian installer may be sufficient.
* What was the outcome of this action?
Standard node scripts run correctly as the de-facto node shebang(
#!/usr/bin/env node) now resolves to 'node' in the user's $PATH
I'm not very well clued on how this may affect other Debian packages, but works
in my little world, and this may extend further.
* What outcome did you expect instead?
The expected behaviour is for the Debian package to install nodejs with a
binary resolvable by the name supported by the node community and existing
software, rather than with a name that refelects Node.js confusing
project/binary naming schemes. Potentially even better would be to support
'nodejs' and 'node', but plan to converge on '/usr/bin/node' for the future.
-- System Information:
Debian Release: jessie/sid
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500,
'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.12-1-rt-amd64 (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages nodejs depends on:
ii libc-ares2 1.10.0-2
ii libc6 2.17-97
ii libgcc1 1:4.8.2-12
ii libssl1.0.0 1.0.1f-1
ii libstdc++6 4.8.2-12
ii libv8-3.14.5 188.8.131.52-5
ii zlib1g 1:1.2.8.dfsg-1
nodejs recommends no packages.
nodejs suggests no packages.
-- no debconf information