freshworkstudio / gps-tracking-nodejs

Let you work with some GPS trackers that connects through tcp.
MIT License
260 stars 159 forks source link

Cannot find module '/usr/lib/node_modules/crc/lib/index.js' #25

Open narendraraghuwanshi opened 5 years ago

narendraraghuwanshi commented 5 years ago

================================================= GPS LISTENER running at port 3000 EXPECTING DEVICE MODEL: GT06

0359751090017463: I'm requesting to be loged.

0359751090017463: Device 0359751090017463 has been authorized. Welcome!

internal/modules/cjs/loader.js:583 throw err; ^

Error: Cannot find module '/usr/lib/node_modules/crc/lib/index.js' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15) at Function.Module._load (internal/modules/cjs/loader.js:507:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at adapter.authorize (/var/www/html/nodejs_gps/node_modules/gps-tracking/lib/adapters/gt06.js:92:15) at Device.login_authorized (/var/www/html/nodejs_gps/node_modules/gps-tracking/lib/device.js:93:20) at Device. (/var/www/html/nodejs_gps/index.js:33:14) at Device.emit (events.js:182:13) at Device.login_request (/var/www/html/nodejs_gps/node_modules/gps-tracking/lib/device.js:86:11) at Device.make_action (/var/www/html/nodejs_gps/node_modules/gps-tracking/lib/device.js:67:15) ubuntu@ip-172-31-56-57:/var/www/html/nodejs_gps$

jAddict7 commented 5 years ago

Install crc globally,

npm install -g crc

or locally

npm install crc

Then at the calling end, change the path to

var crc = require('../../../crc/lib/index.js'); // Exact path to the crc local folder