Azure-Samples / web-apps-node-iot-hub-data-visualization

web application for visualization data from IoT Hub
https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-live-data-visualization-in-web-apps
MIT License
83 stars 432 forks source link

Correction on iothub import #8

Closed otavioarrudasantos closed 6 years ago

otavioarrudasantos commented 6 years ago

When I started the application at first time, it gave me the following error:

root@a257f5ea12bf:/mqtt-azure# npm start

> webapp@0.0.0 start /mqtt-azure
> node server.js

module.js:538
    throw err;
    ^

Error: Cannot find module './IoTHub/iot-hub.js'
    at Function.Module._resolveFilename (module.js:536:15)
    at Function.Module._load (module.js:466:25)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/mqtt-azure/server.js:6:22)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webapp@0.0.0 start: `node server.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the webapp@0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2017-11-23T17_35_16_623Z-debug.log

So I noticed that the instruction require('./IoTHub/iot-hub.js'); was wrong, the folder was named with lowercase "H".

msftclas commented 6 years ago

CLA assistant check
All CLA requirements met.