[uwBridge] Cannot find module 'uws'
Closed this issue · 2 comments
Trying to start the uwBridge script with these instructions
$ nvm install v10.24.1 // because crypt is abandonware https://github.com/axic/scrypt.js/issues/5
$ npm install --dev
$ cd uwBridge
$ ln -s package_Backup.json package.json
$ ln -s system Sentivate
$ npm install
the package_Backup.json symlink is for npm
and the system
-> Sentivate
assumes that this is what https://github.com/universalweb/Network/blob/master/uwBridge/index.js#L3 requires as Sentivate folder is not in the repo.
So generally it tries to start up with
$ node index.js
Master setup started.
startSetup
http service
(node:19324) UnhandledPromiseRejectionWarning: Error: Cannot find module 'uws'
(node:19324) UnhandledPromiseRejectionWarning: Error: Cannot find module 'uws'
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.module.exports [as module] (/home/uwg/uw/Network/uwBridge/system/setup/service/socket/index.js:3:27)
at extendServiceObject (/home/uwg/uw/Network/uwBridge/system/setup/service/index.js:7:10)
at x (/home/uwg/uw/Network/uwBridge/node_modules/Lucy/index.js:1:1439)
at /home/uwg/uw/Network/uwBridge/node_modules/Lucy/index.js:1:8484
at module.exports (/home/uwg/uw/Network/uwBridge/system/setup/service/index.js:10:3)
(node:19324) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:19324) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Looking for uws
module points only to quite outdated https://www.npmjs.com/package/uws whilch points to https://github.com/uNetworking/uWebSockets.js but trying to install it fails because of having to use too old node.js as noted in #3
Following the https://github.com/uNetworking/uWebSockets.js#package-easily-installed
$ yarn add uWebSockets.js@uNetworking/uWebSockets.js#v19.3.0
...
[2/4] Fetching packages...
error comment-parser@1.2.3: The engine "node" is incompatible with this module. Expected version "^12.20 || ^14.14.0 || ^16". Got "10.24.1"
error Found incompatible module.
Given the "uws" is also used in many other places I might be wrong about this dependency but clearly something is missing in https://github.com/universalweb/Network/blob/master/uwBridge/system/setup/service/socket/index.js#L3
Could you please help out with that? It seems that something trivial is missing from repo.
I believe the code is not in a state where it can be run at this time. The Sentivate twitter account had mentioned that the code is only for viewing at this time and is missing a few components to allow it to run (I am assuming these are the missing directories you are running into). They mentioned that the next push will allow it to run with a hello world example.
@shahahmad Is correct - newer version replaces large amounts of files in this consider it an earlier alpha that is several stages behind current. As noted on twitter standby for it to be enabled for this repo. This was in a totally different repo at the time and is an older version we are comfortable with being public atm. Once we process all the new files and no code which we see as proprietary is left it that version would then be uploaded. Many files and code will be changes in uwBridge it's an older version we knew we wouldn't have to prune.