I am trying to compile CoffeeScript but it fails. I have Node.JS installed, set $NODE_PATH to /home//bin (with my username, of course). That directory contains these files:
browserify coffee@1.1.3 uglifyjs
browserify@1.10.8 coffee@1.3.1 uglifyjs@1.0.6
cake sharejs uglifyjs@1.0.7
cake@1.1.3 sharejs@0.5.0-pre uglifyjs@1.2.6
cake@1.3.1 sharejs-exampleserver
coffee sharejs-exampleserver@0.5.0-pre
But I get this error:
Error: Command failed: /bin/sh: node_modules/.bin/browserify: not found
How to solve it? Not sure why it checks that directory.
I used "cake webclient" to compile it using the Cakefile.
I am using Ubuntu 11.10 x64, compiled ndm from source.
EDITED as requested:
I have got a project downloaded from github, which is written in CoffeeScript. I want to run to so I need to compile (build or whatever it is called) it to JavaScript. There is a Cakefile in trunk directory of the project. I got there and executed cake. It said there are 3 options available to build, one of them was cake webclient, so I executed this command. It started converting CoffeeScript files to JavaScript files but then I got that error on one of the files. That is all I know about the situation :D
EDITED (PATH and NODE_PATH values):
pius@pius-laptop:~$ echo $PATH
/home/pius/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/node/bin:/usr/local/share/npm/bin
pius@pius-laptop:~$ echo $NODE_PATH
/home/pius/bin
pius@pius-laptop:~$
I would guess you haven't set $NODE_PATH
correctly because it's looking in the default directory. It should be done like this:
export NODE_PATH="/home/$USER/bin"
And check it with
echo $NODE_PATH
EDIT:
Perhaps something needs access to npm. You can try adding that to your path.
export PATH="$PATH:/usr/local/share/npm/bin"
Also, add these things to your .bashrc
file and then they'll be available for every terminal. You will need to restart the terminal or execute
source ~/.bashrc
for the changes to take effect.
Try to download a pre-made package for ndm & CoffeeScript in Ubuntu 11.10 x64. If those work, then the issue is with the way you compile. If it does not work, then the issue is with your OS install (missing libs, different folders, etc).