1

I followed installation instructions and successfully installed on a Ubuntu machine. But when I try to check the version with command node -v, it doesn't return anything but when I enter nodejs -v it gives out the version. Ditto with the execution of scripts, if I give node hello.js nothing happens but when I give nodejs hello.js, the file executes.

I checked online on various websites and everywhere they are using node and not nodejs. I checked with a friend who has also installed from the same location and even for her its running with node and when she tries to give nodejs it says command not found. I also didnt find any documented issue regarding this. Any help is appreciated.

I just want to confirm is the below the reason for the problem?

There is a naming conflict with the node package (Amateur Packet Radio Node Program), and the nodejs binary has been renamed from node to nodejs. You'll need to symlink /usr/bin/node to /usr/bin/nodejs or you could uninstall the Amateur Packet Radio Node Program to avoid that conflict.

0

1 Answer 1

1

Yes, that is a known problem. You can read about that here, and the issue is also posted on GitHub.

From Debian.org in response:

The nodejs package shall be changed to provide /usr/bin/nodejs, not /usr/bin/node. The package shall declare a Breaks: relationship with any packages in Debian that reference /usr/bin/node.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.