1 Reply Latest reply on Nov 15, 2015 12:34 PM by JamesNagle

    Problems trying to get jsupm_grove working on Galileo Gen 1

    JamesNagle

      Hi,

       

      I have followed the Connect an Intel Galileo to the Internet of Things Foundation - developerWorks Recipes tutorial on connecting Galileo to Bluemix and have that working. I can run the basic .js file and send the cpu temperature to a node-red flow on Bluemix. Now I want to send sensor data from a grove kit that I have.

      From this slkaczma/Bluemix-Intel-Edison · GitHub respository I have added code added code to detect the grove board:

      var groveSensor = require('jsupm_grove');

      which throws an error if I try to run the file: Error: Cannot find module 'jsupm_grove'

      I have tried npm install jsupm_grove which gives the following error:


      npm WARN package.json ibm-iot-quickstart@0.0.1 No repository field.

      npm WARN package.json ibm-iot-quickstart@0.0.1 No README data

      npm WARN package.json make@0.0.0 No repository field.

      npm http GET https://registry.npmjs.org/jsupm_grove

      npm http 304 https://registry.npmjs.org/jsupm_grove

      npm http GET https://registry.npmjs.org/mraa

      npm http 304 https://registry.npmjs.org/mraa

       

       

      > mraa@0.8.1 install /home/root/ibm-iot-quickstart/node_modules/jsupm_grove/node_modules/mraa

      > node-gyp rebuild

       

       

      gyp ERR! build error

      gyp ERR! stack Error: not found: make

      gyp ERR! stack     at F (/usr/lib/node_modules/npm/node_modules/which/which.js:43:28)

      gyp ERR! stack     at E (/usr/lib/node_modules/npm/node_modules/which/which.js:46:29)

      gyp ERR! stack     at /usr/lib/node_modules/npm/node_modules/which/which.js:57:16

      gyp ERR! stack     at Object.oncomplete (fs.js:107:15)

      gyp ERR! System Linux 3.8.7-yocto-standard

      gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"

      gyp ERR! cwd /home/root/ibm-iot-quickstart/node_modules/jsupm_grove/node_modules/mraa

      gyp ERR! node -v v0.10.25

      gyp ERR! node-gyp -v v0.12.2

      gyp ERR! not ok

      npm ERR! mraa@0.8.1 install: `node-gyp rebuild`

      npm ERR! Exit status 1

      npm ERR!

      npm ERR! Failed at the mraa@0.8.1 install script.

      npm ERR! This is most likely a problem with the mraa 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 mraa

      npm ERR! There is likely additional logging output above.

       

       

      npm ERR! System Linux 3.8.7-yocto-standard

      npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "jsupm_grove"

      npm ERR! cwd /home/root/ibm-iot-quickstart

      npm ERR! node -v v0.10.25

      npm ERR! npm -v 1.3.24

      npm ERR! code ELIFECYCLE

      npm ERR!

      npm ERR! Additional logging details can be found in:

      npm ERR!     /home/root/ibm-iot-quickstart/npm-debug.log

      npm ERR! not ok code 0

      root@clanton:~/ibm-iot-quickstart# npm install libupm

      npm WARN package.json ibm-iot-quickstart@0.0.1 No repository field.

      npm WARN package.json ibm-iot-quickstart@0.0.1 No README data

      npm WARN package.json make@0.0.0 No repository field.

      npm http GET https://registry.npmjs.org/libupm

      npm http 404 https://registry.npmjs.org/libupm

      npm ERR! TypeError: Cannot read property 'latest' of undefined

      npm ERR!     at next (/usr/lib/node_modules/npm/lib/cache.js:692:35)

      npm ERR!     at /usr/lib/node_modules/npm/lib/cache.js:680:5

      npm ERR!     at saved (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:142:7)

      npm ERR!     at /usr/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:133:7

      npm ERR!     at Object.oncomplete (fs.js:107:15)

      npm ERR! If you need help, you may report this *entire* log,

      npm ERR! including the npm and node versions, at:

      npm ERR!     <http://github.com/isaacs/npm/issues>

       

       

      npm ERR! System Linux 3.8.7-yocto-standard

      npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "libupm"

      npm ERR! cwd /home/root/ibm-iot-quickstart

      npm ERR! node -v v0.10.25

      npm ERR! npm -v 1.3.24

      npm ERR! type non_object_property_load

      npm ERR!

      npm ERR! Additional logging details can be found in:

      npm ERR!     /home/root/ibm-iot-quickstart/npm-debug.log

      npm ERR! not ok code 0

       

      I have tried npm install node-gyp and make but I still get the above errors. If I type node-gyp rebuild I get the following:

       

      gyp info it worked if it ends with ok

      gyp info using node-gyp@3.1.0

      gyp info using node@0.10.25 | linux | ia32

      gyp info spawn python2

      gyp info spawn args [ '/usr/lib/node_modules/node-gyp/gyp/gyp_main.py',

      gyp info spawn args   'binding.gyp',

      gyp info spawn args   '-f',

      gyp info spawn args   'make',

      gyp info spawn args   '-I',

      gyp info spawn args   '/home/root/ibm-iot-quickstart/build/config.gypi',

      gyp info spawn args   '-I',

      gyp info spawn args   '/usr/lib/node_modules/node-gyp/addon.gypi',

      gyp info spawn args   '-I',

      gyp info spawn args   '/home/root/.node-gyp/0.10.25/common.gypi',

      gyp info spawn args   '-Dlibrary=shared_library',

      gyp info spawn args   '-Dvisibility=default',

      gyp info spawn args   '-Dnode_root_dir=/home/root/.node-gyp/0.10.25',

      gyp info spawn args   '-Dnode_gyp_dir=/usr/lib/node_modules/node-gyp',

      gyp info spawn args   '-Dnode_lib_file=node.lib',

      gyp info spawn args   '-Dmodule_root_dir=/home/root/ibm-iot-quickstart',

      gyp info spawn args   '--depth=.',

      gyp info spawn args   '--no-parallel',

      gyp info spawn args   '--generator-output',

      gyp info spawn args   'build',

      gyp info spawn args   '-Goutput_dir=.' ]

      gyp: binding.gyp not found (cwd: /home/root/ibm-iot-quickstart) while trying to load binding.gyp

      gyp ERR! configure error

      gyp ERR! stack Error: `gyp` failed with exit code: 1

      gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/node-gyp/lib/configure.js:355:16)

      gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)

      gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)

      gyp ERR! System Linux 3.8.7-yocto-standard

      gyp ERR! command "node" "/usr/bin/node-gyp" "rebuild"

      gyp ERR! cwd /home/root/ibm-iot-quickstart

      gyp ERR! node -v v0.10.25

      gyp ERR! node-gyp -v v3.1.0

      gyp ERR! not ok

       

       

       

       

      I have tried to update the node version with npm cache clean -f, npm install -g n, n stable but the version remains the same. If this is a binding.gyp issue is there any advice on how and what to add or if it is a node version problem how do I update this? Any help would be must appreciated.