I carefully followed Andy Sigler's tutorial on how to setup node.js on Arduino Yun. But I'm getting this error "Cannot find module 'serialport'". my node.js file is in mnt/sda1/arduino/node folder. and I have installed node-serialport successfully through ssh. Kindly helpc
-
Did you check that post "cannot find module 'serialport' using Node.js and Johnny-Five" ?– J. PiquardCommented Jan 19, 2017 at 17:18
-
@J. Piquard I'm trying to use node.js in Arduino Yun. The post you mentioned is regarding installing node.js on a computer. It's not helpful..Thanks anyways.– CuriousHashCommented Jan 20, 2017 at 1:51
Add a comment
|
1 Answer
I solved the problem by following these steps:
Make a folder node_modules in mnt/sda1/
cd /mnt/sda1
wget http://wiki.linino.org/lib/exe/fetch.php?media=wiki:serialport-1.6.1_mips-25-ubuntu.tar.gz -O serialport-1.6.1_mips-25-ubuntu.tar.gz
run $ tar xvf serialport-1.6.1_mips-25-ubuntu.tar.gz -C /mnt/sda1/node_modules