hello , im trying to test node-pc-remote.js on raspberry pi 2 but im getting the error " Cannot find module ‘robotjs’"
I tried to “npm install robots” but i get the following :
root@raspberrypi:/home/pi# npm install robotjs
/
robotjs@0.3.1 install /home/pi/node_modules/robotjs
node-gyp rebuild
gyp WARN EACCES user “root” does not have permission to access the dev dir “/root/.node-gyp/4.2.1”
gyp WARN EACCES attempting to reinstall using temporary dev dir “/home/pi/node_modules/robotjs/.node-gyp”
make: Entering directory ‘/home/pi/node_modules/robotjs/build’
CXX(target) Release/obj.target/robotjs/src/robotjs.o
cc1plus: warning: command line option ‘-Wbad-function-cast’ is valid for C/ObjC but not for C++
…/src/robotjs.cc:2:17: fatal error: nan.h: No such file or directory
#include <nan.h>
^
compilation terminated.
robotjs.target.mk:107: recipe for target ‘Release/obj.target/robotjs/src/robotjs.o’ failed
make: *** [Release/obj.target/robotjs/src/robotjs.o] Error 1
make: Leaving directory ‘/home/pi/node_modules/robotjs/build’
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.7-v7+
gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”
gyp ERR! cwd /home/pi/node_modules/robotjs
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Linux 4.1.7-v7+
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “robotjs”
npm ERR! node v4.2.1
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! robotjs@0.3.1 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the robotjs@0.3.1 install script ‘node-gyp rebuild’.
npm ERR! This is most likely a problem with the robotjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls robotjs
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/npm-debug.log
Can you help me ? tried to find solution over the internet but nothing helped