Yuga
Yuga

Reputation: 125

npm module n emits errors

After installing n by command 'sudo npm install -g n', I want list all node versions,but some errors come out, even though, n can work normally! As bellow:

$ n list
/usr/bin/n: line 262: which: command not found
/usr/bin/n: line 262: which: command not found

0.0.1
0.0.2
0.0.3
0.0.4

I don't know why, there is no need to configure my bin foldeer.

Upvotes: 0

Views: 161

Answers (3)

shadowspawn
shadowspawn

Reputation: 3825

This is fixed in the current version of n.

Old versions of n used the which command which is not standard. Newer versions only use command -v which is a standard posix command.

Upvotes: 0

Yuga
Yuga

Reputation: 125

I have solved it, after npm install which...

sudo npm install -g whitch

Upvotes: 1

derp
derp

Reputation: 2308

Try installing which

sudo apt-get install which

Upvotes: 0

Related Questions