10

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?

Luke Madhanga
  • 6,871
  • 2
  • 43
  • 47

3 Answers3

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
  • 37,241
  • 25
  • 195
  • 267
Luke Madhanga
  • 6,871
  • 2
  • 43
  • 47
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,709
  • 5
  • 34
  • 62