In attempting to install and use
node today, I ran into an interesting conflict with Ubuntu/Debian.
Finding the Problem
- I wanted to compile a
lessfile to a
cssfile for a web page (actually this blog). This requires installing the
npm(the Node Package Manager).
- After installing the
npm, I tried to run it. It did nothing. By nothing, I mean that it truly did not do a single thing. On the command line, it looked like this:
Nothing brought a response, nothing at all. Not
lessc --help, not
lessc -v, not anything. I was perplexed, since I’ve never had a program be totally unresponsive to anything at all.
- Running a “which lessc” tells me where lessc is, and examinging it shows me that it’s a totally valid
- The next logical step is to check if
nodeis working correctly. As it turns out, running
nodeon the command line is totally non-responsive.
- Checking where
nodeis and what it is, I see the following:
- It seems I’ve found the problem!
What Exactly is the Problem?
The problem is that many
node programs (including
lessc) assume that the
node interpreter can be accessed via the command
node. However, on my system (and maybe many others) it turns out that the system command
node is linked to another program,
Fixing the Problem
ax25-node is a package that’s for use with HAM Radio, I feel it’s safe to change that link from
nodejs. I do that with the following command:
With that done,
lessc now work properly.