Can not find module 'bonescript'



I’m trying to run a simple script using the bonescript library on a BeagleBone with Linux Debian installed, and when I run in the Cloud9 IDE, it works fine. My script is called blinkled.js and when I try to run in line command, like “./blinkled.js”, it is shown a long error message that starts with “Can not find module ‘bonescript’”.

How can I correct that?


According to the installation instructions here, you should be able to run TERM=none npm install -g bonescript to install it. If that doesn’t work, try removing the -g flag and try again.


dannytech, I already solved the problem. I just needed to run the command below.
export NODE_PATH=/usr/local/lib/node_modules

Bonescript, nodejs and Cloud9 IDE was already installed OK. So It works fine now.

Thanks for your help!