I am trying to set up the JavaScript code tester Karma, but when I run the command to initialise karma I get the error 'usr/bin/env: node: No such file or directory'. How can I fix it?
Asked
Active
Viewed 4,766 times
3 Answers
16
As per @digitalmediums
I've found this is often a misnaming error, if you install from a package manager you bin may be called nodejs so you just need to symlink it like so "sudo ln -s /usr/bin/nodejs /usr/bin/node"
Cœur
- 34,719
- 24
- 185
- 251
Luke Madhanga
- 5,507
- 1
- 41
- 44
-
Saved my time. Thanks buddy :) – Taimoor Changaiz Feb 27 '15 at 08:34
2
sudo ln -s /usr/bin/nodejs /usr/bin/node this worked for me. node is a reserved term in ubuntu thus node.js is actually nodejs.
Justin
- 21
- 1
0
I found a similar question with same issue here
Usually the non packaged node version (not nodejs) that the user installs can be run from /usr/local/bin/node
as
#!/usr/local/bin/node
Community
- 1
- 1
user2290820
- 2,481
- 4
- 32
- 60