1

I have the latest stable node.js. It works, npm works, nvc works.

When I try to install grunt I install grunt-cli, I install grunt in a local folder and after typing grunt or grunt --version or grunt -h etc I get this:

$ grunt --version 
/usr/bin/env: node: No such file or directory

I tried adding path but since I am new to Linux I might have done it wrong.

This is the report from installing grunt-cli:

/usr/local/bin/grunt -> /usr/local/lib/node_modules/grunt-cli/bin/grunt   
grunt-cli@0.1.13 /usr/local/lib/node_modules/grunt-cli
├── resolve@0.3.1
├── nopt@1.0.10 (abbrev@1.0.7) 
└── findup-sync@0.1.3 (lodash@2.4.2, glob@3.2.11)

feel free to talk to me like you would talk to a child... thanks!

$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
Zanna
  • 72,312
Bellator
  • 23
  • 6

1 Answers1

3

Y'know what, my last comment was pretty snarky. Apologies.

You have node.js installed, except the binary is called nodejs and grunt is assuming it's node.

There's a built-in way to create aliases to programs: update-alternatives

sudo update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10

After that, grunt should be able to find node that points to nodejs

glenn jackman
  • 18,218