2
votes

I have searched online thru this site and others for a solution, so I finally bow my head and ask for help. It looks like most of the answers are identifying the node/nodejs naming conflict and creating symlinks as a solution. I don't have a nodejs anywhere on my system.

I am using a _ n _ as my node version manager. So,

sudo n

displays a list of installed versions and allows me to choose. n simply copies the chosen version into /usr/local/bin/ as node. It has already established a link from /usr/bin/node to the managed version.

I installed a javascript library called 'waigo.' When I run the following:

waigo init

I get the following output...

/usr/bin/env: node --harmony: No such file or directory

arrgghhh..... I'm frustrated. Any help will be appreciated.

1
Potentially you just don't have /usr/bin/node in your PATH, so 'node' on its own isn't resolving to the executable you want it to. What does 'echo $PATH' output?unwitting
echo $PATH provides a list of all the directories in the path. And when I run which node, I get "/usr/local/bin/node"user2281135

1 Answers

0
votes

It looks like a problem with the shebang line in a shell script which specifies the program used to interpret the file. This might look like:

#!/usr/bin/env node --harmony

The error message in your case suggests that env is attempting to locate "node --harmony" which was probably a problem with the executable file run when you typed waigo. For example, it might have had a shebang line incorrectly formatted like:

#!/usr/bin/env "node --harmony"