I have recently attempted to install Node JS to have a local development environment. However, after following the step by step directions, I can not actually compile a '.js' file yet. Rather, I get the following error:
-bash: /usr/local/nodejs/bin/node: cannot execute binary file
I have searched extensively for a solution and the only hint I could find was that maybe my path is messed up. I have included that as well...
/usr/local/nodejs/bin:/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin:/usr/local/nodejs/bin:/usr/local/nodejs/bin
Any help would be greatly appreciated! Thanks!
/usr/local/nodejs/bin/nodeand make sure it has executable permissions. (and if it's a symlink, make sure the symlink and the target location are executable).