2020-08-02, 08:35 PM
(2020-07-26, 11:53 PM)seandepagnier Wrote: Been trying to use this for hours.. When running signalk-server from bin directory:
Code:internal/modules/cjs/loader.js:638
throw err;
^
Error: Cannot find module '../lib'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/home/pi/signalk-server-node-1.32.0/bin/signalk-server:19:16)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
I tried npm install, but my internet connection is not stable enough to complete this, and when it fails it corrupts the last download so I have to clear the cache and start over, and it doesn't ever succeed. I have been trying all day.
Any suggestions?
The error looks like you are running off a git clone and the project has not been built. You need to run
Code:
npm install
npm run build
so that boils back down to getting npm install to run.
You can try https://www.npmjs.com/package/npm-offline - running npm install several times with it in use should build up a local cache and the install should succeed eventually. I haven't used it, so no idea how well it works. And installing npm-offline naturally needs also npm install to succeed...