3 Replies Latest reply on Mar 30, 2017 12:10 AM by mohamedshaharris_intel

    Node library problem

    yichen

      Hi,

      I got some problem when I using node js between baytrail sdk from windshare and image built by myself.

       

      If I use baytrail sdk from windshare's image

      There is only one node_module under /usr/lib

      I can easily to use and find my module and using node-red

       

      If I use image built by my self the node_module will under /usr/lib and /usr/lib64

      and node-red will under /usr/lib64

      That's hard for me to execute node.js program.

       

      Because I am not familier with node.js so I don't know how to change the path.

       

      for example I can easily to run https://github.com/Azure/azure-iot-sdk-node/blob/2047cad9224c328a2b421aae644ff23102d32f19/device/core/readme.md

      under image from windshare

       

      Using image built by myself will got error message like

      module.js:327

      throw err;

      ^

       

      Error: Cannot find module 'azure-iothub'

      at Function.Module._resolveFilename (module.js:325:15)

      at Function.Module._load (module.js:276:25)

      at Module.require (module.js:353:17)

      at require (internal/module.js:12:17)

      at Object.<anonymous> (/root/sendcloudtodevicemessage/SendCloudToDeviceMessge.js:3:14)

      at Module._compile (module.js:409:26)

      at Object.Module._extensions..js (module.js:416:10)

      at Module.load (module.js:343:32)

      at Function.Module._load (module.js:300:12)

      at Function.Module.runMain (module.js:441:10)