Giter VIP home page Giter VIP logo

discovery-swarm-web's Introduction

discovery-swarm-web

Abstracts away discovery-swarm interaction with WebRTC and a websocket gateway.

npm install --save discovery-swarm-web

Example:

const DiscoverySwarmWeb = require('discovery-swarm-web')
const swarm = new DiscoverySwarmWeb({
  stream: () => archive.replicate(),
})

swarm.join(archive.discoveryKey)

How it works

Under the hood it uses @geut/discovery-swarm-webrtc to find WebRTC peers for channels, and uses discovery-swarm-stream over a websocket to bridge to the rest of the Dat network by using discovery-swarm along with the dat-swarm-defaults configuration.

A websocket gets created for signaling WebRTC peers, and another one gets created to proxy connections from the P2P network.

API

new DiscoverySwarmWeb(opts)

opts include:

  • stream: The only required field. Return a stream to handle an incoming connection
  • id: The ID you want to use to show up in the swarm
  • bootstrap: An array of signal server urls used for WebRTC discovery. Uses signal.mauve.moe by default.
  • discovery: A discovery-swarm-web server URl to connect to. By default it uses discoveryswarm.mauve.moe, please supply your own if you're deploying to production. All discovery servers reach out to the same P2P network.

swarm.join(key)

Starts looking for peers for the given key. This should be either a string or a Buffer. For Dat, you should use the discoveryKey of your hypercore or hyperdrive.

swarm.leave(key)

Stops looking for peers for the given key.

swarm.close(), swarm.destroy()

Close the swarm: closes all connections to peers, to the discovery server.

CLI

You can start your own gateway for added performance and privacy using the CLI, or if you want to host one for an application you're building. By default it will listen on TCP 3472 (DISC), but that can be changed with the --port flag.

npm install -g discovery-swarm-web

discovery-swarm-web --port 3472

Roadmap:

  • Attempt to connect to a local discovery instance before the internet
  • Generate ID if one is not provided
  • Auto-reconnect logic to discover-swarm-stream websocket
  • Emit the connection event
  • Have limits for the number of connections made for a given channel (auto-close new connections after reaching it)
    • Resolve bugs with close event not firing
  • Don't join discovery for a key unless you get no WebRTC peers (then join after a delay)
  • Disconnect peers with known ID
  • Make stream optional with a default handshake function

discovery-swarm-web's People

Contributors

dpaez avatar frando avatar rangermauve avatar tinchoz49 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

discovery-swarm-web's Issues

re-connect seems to crash discovery server

  1. I start the discovery server:
    > discovery-swarm-web

  2. I start budo:
    budo demo.js:bundle.js -open --live --ssl
    and also tried budo demo.js:bundle.js -open --live to not serve my site over https.

  3. My website uses dat-js like:
    new require('dat-js')({ discovery: 'http://localhost:3472' })

This seems to work, but as soon as i edit my project and save the changes, budo live reloads it, which causes dat-js to connect again to the discovery server, which makes it crash with:

events.js:177
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at TCP.onStreamRead (internal/stream_base_commons.js:183:27)
Emitted 'error' event at:
    at emitErrorNT (C:\Users\bommel\Desktop\TEMP code\wallet-filesystem\node_modules\readable-stream\lib\internal\streams\destroy.js:68:8)
    at processTicksAndRejections (internal/process/task_queues.js:84:9) {
  errno: 'ECONNRESET',
  code: 'ECONNRESET',
  syscall: 'read',
  type: 'error',
  target: WebSocket { ... }

use npm published `discovery-swarm-webrtc` instead of github

discovery-swarm-web depends on

"@geut/discovery-swarm-webrtc": "github:geut/discovery-swarm-webrtc#sub-signalhub",

which as you can see is being loaded via npm/yarn's "github:/" syntax.

the sub-signalhub branch of discovery-swarm-webrtc lists its package version number as 1.0.1. This version appears to be hosted on npm.

Some environments (browser prototyping IDEs in particular) don't have npm/yarn toolchains that can fetch packages via github:<user>/<repo>. Unless its necessary, it would be easier in some browser-based dev environments to test client-side dat features that depend on discovery-swarm if this dependency was loaded from npm.

"@geut/discovery-swarm-webrtc": "v1.0.1",

That said, I realize @geut/discovery-swarm-webrtc is changing a lot right now and if the v2 branch will be compatible again in the future with discovery-swarm-web then I guess just wait until then to change things.

discovery-swarm-web package installation problems

(base) marco@pc01:~/webMatters/vueMatters/GGC$ yarn add discovery-swarm-web
yarn add v1.22.4
$ npx npm-force-resolutions
npx: installed 5 in 0.753s
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix   
package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, 
remove package-lock.json.
[1/4] Resolving packages...
warning Resolution field "[email protected]" is incompatible with requested version "[email protected]"
[2/4] Fetching packages...
warning Pattern ["esprima-fb@~3001.0001.0000-dev-harmony-fb"] is trying to unpack in the same destination "/home/marco
/.cache/yarn/v6/npm-esprima-fb-3001.1.0-dev-harmony-fb-b77d37abcd38ea0b77426bb8bc2922ce6b426411-integrity
/node_modules/esprima-fb" as pattern ["esprima-fb@~3001.1.0-dev-harmony-fb"]. This could result in non-deterministic 
behavior, skipping.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "[email protected] - 3".
warning " > [email protected]" has unmet peer dependency "popper.js@^1.16.0".
warning " > [email protected]" has unmet peer dependency "@gooddollar/react-native-webview-crypto@^0.*".
warning " > [email protected]" has unmet peer dependency "bufferutil@^4.0.1".
warning " > [email protected]" has unmet peer dependency "utf-8-validate@^5.0.2".
warning "http-proxy-middleware > http-proxy > [email protected]" has unmet peer dependency "debug@^3.0.0 || ^4.0.0".
warning " > [email protected]" has unmet peer dependency "rxjs@^6.5.4".
warning "tiptap-extensions > [email protected]" has incorrect peer dependency "prosemirror-tables@^0.9.1".
warning " > [email protected]" has unmet peer dependency "y-protocols@^0.2.0".
warning " > [email protected]" has unmet peer dependency "prosemirror-model@^1.7.1".
warning " > [email protected]" has unmet peer dependency "prosemirror-state@^1.2.3".
warning " > [email protected]" has unmet peer dependency "prosemirror-view@^1.9.10".
[4/4] Building fresh packages...
[1/2] ⢀ utp-native
warning Error running install script for optional dependency: "/home/marco/webMatters/vueMatters/GGC/node_modules  
/discovery-swarm/node_modules/utp-native: Command failed.
Exit code: 1
Command: node-gyp-build
Arguments: 
Directory: /home/marco/webMatters/vueMatters/GGC/node_modules/discovery-swarm/node_modules/utp-native
Output:
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info find Python using Python version 3.7.4 found at \"/home/marco/anaconda3/bin/python\"
gyp info spawn /home/marco/anaconda3/bin/python
gyp info spawn args [
gyp info spawn args   '/home/marco/.nvm/versions/node/v14.3.0/lib/node_modules/npm/node_modules/node-gyp/gyp  
/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/marco/webMatters/vueMatters/GGC/node_modules/discovery-swarm/node_modules/utp-native
/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/marco/.nvm/versions/node/v14.3.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/marco/.cache/node-gyp/14.3.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/home/marco/.cache/node-gyp/14.3.0',
gyp info spawn args   '-Dnode_gyp_dir=/home/marco/.nvm/versions/node/v14.3.0/lib/node_modules/npm/node_modules/node-
gyp',
gyp info spawn args   '-Dnode_lib_file=/home/marco/.cache/node-gyp/14.3.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/marco/webMatters/vueMatters/GGC/node_modules/discovery-
swarm/node_modules/utp-native',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/marco/webMatters/vueMatters/GGC/node_modules/discovery-swarm/node_modules/utp-
native/build'
  CXX(target) Release/obj.target/libutp/deps/libutp/utp_internal.o
In file included from ../deps/libutp/utp_internal.cpp:33:
../deps/libutp/utp_internal.h: In constructor ‘UTPSocketKey::UTPSocketKey(const PackedSockAddr&, uint32)’:
../deps/libutp/utp_internal.h:79:32: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct   
UTPSocketKey’; use assignment instead [-Wclass-memaccess]
   79 |   memset(this, 0, sizeof(*this));
      |                                ^
../deps/libutp/utp_internal.h:74:8: note: ‘struct UTPSocketKey’ declared here
   74 | struct UTPSocketKey {
      |        ^~~~~~~~~~~~
../deps/libutp/utp_internal.cpp: In function ‘size_t utp_process_incoming(UTPSocket*, const byte*, size_t, bool)’:
../deps/libutp/utp_internal.cpp:1970:34: warning: comparison of integer expressions of different signedness: ‘int’ and ‘uint32’    
{aka ‘unsigned int’} [-Wsign-compare]
 1970 |   if (conn->mtu_probe_seq && seq == conn->mtu_probe_seq) {
      |                              ~~~~^~~~~~~~~~~~~~~~~~~~~~
  CXX(target) Release/obj.target/libutp/deps/libutp/utp_utils.o
  CXX(target) Release/obj.target/libutp/deps/libutp/utp_hash.o
  CXX(target) Release/obj.target/libutp/deps/libutp/utp_callbacks.o
In file included from ../deps/libutp/utp_callbacks.h:27,
                 from ../deps/libutp/utp_callbacks.cpp:25:
../deps/libutp/utp_internal.h: In constructor ‘UTPSocketKey::UTPSocketKey(const PackedSockAddr&, uint32)’:
../deps/libutp/utp_internal.h:79:32: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct    
UTPSocketKey’; use assignment instead [-Wclass-memaccess]
   79 |   memset(this, 0, sizeof(*this));
      |                                ^
../deps/libutp/utp_internal.h:74:8: note: ‘struct UTPSocketKey’ declared here
   74 | struct UTPSocketKey {
      |        ^~~~~~~~~~~~
  CXX(target) Release/obj.target/libutp/deps/libutp/utp_api.o
In file included from ../deps/libutp/utp_api.cpp:26:
../deps/libutp/utp_internal.h: In constructor ‘UTPSocketKey::UTPSocketKey(const PackedSockAddr&, uint32)’:
../deps/libutp/utp_internal.h:79:32: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct     
UTPSocketKey’; use assignment instead [-Wclass-memaccess]
   79 |   memset(this, 0, sizeof(*this));
      |                                ^
../deps/libutp/utp_internal.h:74:8: note: ‘struct UTPSocketKey’ declared here
  74 | struct UTPSocketKey {
      |        ^~~~~~~~~~~~
  CXX(target) Release/obj.target/libutp/deps/libutp/utp_packedsockaddr.o
  AR(target) Release/obj.target/deps/utp.a
  COPY Release/utp.a
  CXX(target) Release/obj.target/utp/src/utp_uv.o
In file included from ../src/utp_uv.cc:2:
../../../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../../../nan/nan.h:2294:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void  
(*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
 2294 |     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
      |                                                              ^
../src/utp_uv.cc: At global scope:
../src/utp_uv.cc:219:1: warning: ‘uint64 on_utp_schedule_ack(utp_callback_arguments*)’ defined but not used [-Wunused- 
function]
  219 | on_utp_schedule_ack (utp_callback_arguments *a) {
      | ^~~~~~~~~~~~~~~~~~~
  CXX(target) Release/obj.target/utp/src/socket_wrap.o
In file included from ../src/socket_wrap.h:4,
                 from ../src/socket_wrap.cc:1:
../../../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../../../nan/nan.h:2294:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void       
(*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type]
 2294 |     , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
      |                                                              ^
../src/socket_wrap.cc: In member function ‘int SocketWrap::Drain()’:
../src/socket_wrap.cc:69:40: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(v8::Local<v8::Object>, int, 
v8::Local<v8::Value>*) const’ is deprecated [-Wdeprecated-declarations]
   69 |       this->on_drain->Call(ctx, 0, NULL);
      |                                        ^
In file included from ../src/socket_wrap.h:4,
                 from ../src/socket_wrap.cc:1:
../../../../nan/nan.h:1720:3: note: declared here
 1720 |   Call(v8::Local<v8::Object> target
      |   ^~~~
../src/socket_wrap.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE    
SocketWrap::Context(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/socket_wrap.cc:99:45: error: no matching function for call to ‘v8::Value::ToObject()’
   99 |   Local<Object> context = info[0]->ToObject();
      |                                             ^
In file included from /home/marco/.cache/node-gyp/14.3.0/include/node/node.h:67,
                 from ../../../../nan/nan.h:56,
                 from ../src/socket_wrap.h:4,
                 from ../src/socket_wrap.cc:1:
/home/marco/.cache/node-gyp/14.3.0/include/node/v8.h:2819:44: note: candidate: ‘v8::MaybeLocal<v8::Object>    
v8::Value::ToObject(v8::Local<v8::Context>) const’
 2819 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
      |                                            ^~~~~~~~
/home/marco/.cache/node-gyp/14.3.0/include/node/v8.h:2819:44: note:   candidate expects 1 argument, 0 provided
. ./src/socket_wrap.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE    
SocketWrap::Write(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/socket_wrap.cc:113:43: error: no matching function for call to ‘v8::Value::ToObject()’
  113 |   Local<Value> buffer = info[0]->ToObject();
      |                                           ^
In file included from /home/marco/.cache/node-gyp/14.3.0/include/node/node.h:67,
                 from ../../../../nan/nan.h:56,
                 from ../src/socket_wrap.h:4,
                 from ../src/socket_wrap.cc:1:
/home/marco/.cache/node-gyp/14.3.0/include/node/v8.h:2819:44: note: candidate: ‘v8::MaybeLocal<v8::Object>  
v8::Value::ToObject(v8::Local<v8::Context>) const’
 2819 |   V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
      |                                            ^~~~~~~~
/home/marco/.cache/node-gyp/14.3.0/include/node/v8.h:2819:44: note:   candidate expects 1 argument, 0 provided
../src/socket_wrap.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE  
 SocketWrap::Writev(Nan::NAN_METHOD_ARGS_TYPE)’:
../src/socket_wrap.cc:141:49: error: no matching function for call to ‘v8::Array::Get(uint32_t&)’
  141 |     Local<Value> buffer = Nan::Get(writes->Get(i)->ToObject(), chunk).ToLocalChecked();
      |                                                 ^
In file included from /home/marco/.cache/node-gyp/14.3.0/include/node/node.h:67,
                 from ../../../../nan/nan.h:56,
                 from ../src/socket_wrap.h:4,
                 from ../src/socket_wrap.cc:1:
/home/marco/.cache/node-gyp/14.3.0/include/node/v8.h:3686:43: note: candidate: ‘v8::MaybeLocal<v8::Value>  
v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
 3686 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
      |                                           ^~~
/home/marco/.cache/node-gyp/14.3.0/include/node/v8.h:3686:43: note:   candidate expects 2 arguments, 1 provided
/home/marco/.cache/node-gyp/14.3.0/include/node/v8.h:3689:43: note: candidate: ‘v8::MaybeLocal<v8::Value>   
v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
 3689 |   V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
      |                                           ^~~
/home/marco/.cache/node-gyp/14.3.0/include/node/v8.h:3689:43: note:   candidate expects 2 arguments, 1 provided
../src/socket_wrap.cc: In static member function ‘static v8::Local<v8::Value> SocketWrap::NewInstance()’:
../src/socket_wrap.cc:243:62: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
  243 |   instance = Nan::NewInstance(constructorHandle->GetFunction()).ToLocalChecked();
      |                                                              ^
In file included from /home/marco/.cache/node-gyp/14.3.0/include/node/node.h:67,
                 from ../../../../nan/nan.h:56,
                 from ../src/socket_wrap.h:4,
                 from ../src/socket_wrap.cc:1:
/home/marco/.cache/node-gyp/14.3.0/include/node/v8.h:6404:46: note: candidate: ‘v8::MaybeLocal<v8::Function>        
v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’
 6404 |   V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
      |                                              ^~~~~~~~~~~
/home/marco/.cache/node-gyp/14.3.0/include/node/v8.h:6404:46: note:   candidate expects 1 argument, 0 provided
utp.target.mk:121: recipe for target 'Release/obj.target/utp/src/socket_wrap.o' failed
make: *** [Release/obj.target/utp/src/socket_wrap.o] Error 1
make: Leaving directory '/home/marco/webMatters/vueMatters/GGC/node_modules/discovery-swarm/node_modules/utp-
native/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/marco/.nvm/versions/node/v14.3.0/lib/node_modules/npm/node_modules
/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 5.3.0-62-generic
gyp ERR! command \"/home/marco/.nvm/versions/node/v14.3.0/bin/node\" \"/home/marco/.nvm/versions/node/v14.3.0/
 lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
gyp ERR! cwd /home/marco/webMatters/vueMatters/GGC/node_modules/discovery-swarm/node_modules/utp-native
gyp ERR! node -v v14.3.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok"
success Saved lockfile.
success Saved 17 new dependencies.
info Direct dependencies
└─ [email protected]
info All dependencies
├─ [email protected]
├─ [email protected]
 ├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
├─ [email protected]
└─ [email protected]
$ electron-builder install-app-deps
  • electron-builder  version=22.7.0
  • rebuilding native dependencies  [email protected], [email protected], [email protected], [email protected],    
[email protected], [email protected], [email protected], [email protected], [email protected]
                                    platform=linux
                                    arch=x64
  • rebuilding native dependency  name=bufferutil version=4.0.1
  • rebuilding native dependency  name=abstract-socket version=2.1.1
  • rebuilding native dependency  name=canvas version=2.6.1
  • rebuilding native dependency  name=fd-lock version=1.1.1
  • rebuilding native dependency  name=sodium-native version=3.2.0
  • rebuilding native dependency  name=utf-8-validate version=5.0.2
  • rebuilding native dependency  name=utp-native version=2.2.1
  • rebuilding native dependency  name=websocket version=1.0.31
  • rebuilding native dependency  name=sodium-native version=2.4.9
Done in 102.43s.

I then removed discovery-swarm-web and installed node-gyp alone:

(base) marco@pc01:~/webMatters/vueMatters/GGC$ yarn remove discovery-swarm-web
yarn remove v1.22.4
[1/2] Removing module discovery-swarm-web...
[2/2] Regenerating lockfile and installing missing dependencies...
success Uninstalled packages.


(base) marco@pc01:~/webMatters/vueMatters/GGC$ yarn add node-gyp
yarn add v1.22.4
$ npx npm-force-resolutions
npx: installed 5 in 0.75s
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix 
package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning,    
remove package-lock.json.
[1/4] Resolving packages...
warning Resolution field "[email protected]" is incompatible with requested version "[email protected]"
[2/4] Fetching packages...
warning Pattern ["esprima-fb@~3001.0001.0000-dev-harmony-fb"] is trying to unpack in the same destination "/home/marco
/.cache/yarn/v6/npm-esprima-fb-3001.1.0-dev-harmony-fb-b77d37abcd38ea0b77426bb8bc2922ce6b426411-integrity   
/node_modules/esprima-fb" as pattern ["esprima-fb@~3001.1.0-dev-harmony-fb"]. This could result in non-deterministic 
behavior, skipping.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "[email protected] - 3".
warning " > [email protected]" has unmet peer dependency "popper.js@^1.16.0".
warning " > [email protected]" has unmet peer dependency "@gooddollar/react-native-webview-crypto@^0.*".
warning " > [email protected]" has unmet peer dependency "bufferutil@^4.0.1".
warning " > [email protected]" has unmet peer dependency "utf-8-validate@^5.0.2".
warning "http-proxy-middleware > http-proxy > [email protected]" has unmet peer dependency "debug@^3.0.0 || ^4.0.0".
warning " > [email protected]" has unmet peer dependency "rxjs@^6.5.4".
warning "tiptap-extensions > [email protected]" has incorrect peer dependency "prosemirror-tables@^0.9.1".
warning " > [email protected]" has unmet peer dependency "y-protocols@^0.2.0".
warning " > [email protected]" has unmet peer dependency "prosemirror-model@^1.7.1".
warning " > [email protected]" has unmet peer dependency "prosemirror-state@^1.2.3".
warning " > [email protected]" has unmet peer dependency "prosemirror-view@^1.9.10".
[4/4] Building fresh packages...

success Saved 1 new dependency.
info Direct dependencies
└─ [email protected]
info All dependencies
└─ [email protected]
$ electron-builder install-app-deps
  • electron-builder  version=22.7.0
  • rebuilding native dependencies  [email protected], [email protected], [email protected], [email protected],  
[email protected], [email protected], [email protected], [email protected]
                                    platform=linux
                                    arch=x64
  • rebuilding native dependency  name=bufferutil version=4.0.1
  • rebuilding native dependency  name=abstract-socket version=2.1.1
  • rebuilding native dependency  name=canvas version=2.6.1
  • rebuilding native dependency  name=fd-lock version=1.1.1
  • rebuilding native dependency  name=sodium-native version=3.2.0
  • rebuilding native dependency  name=utf-8-validate version=5.0.2
  • rebuilding native dependency  name=utp-native version=2.2.1
  • rebuilding native dependency  name=websocket version=1.0.31
Done in 18.35s.

But adding again discovery-swarm-web package gives the above errors

Environment Info:

  System:
    OS: Linux 5.3 Ubuntu 18.04.4 LTS (Bionic Beaver)
    CPU: (8) x64 Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz
  Binaries:
    Node: 14.3.0 - ~/.nvm/versions/node/v14.3.0/bin/node
    Yarn: 1.22.4 - /usr/bin/yarn
    npm: 6.14.5 - ~/.nvm/versions/node/v14.3.0/bin/npm
  Browsers:
    Chrome: 84.0.4147.89
    Firefox: 78.0.2
  npmGlobalPackages:
    @vue/cli: 4.4.4

Not compatible with electron main process

Running this in a non-browser window fails quickly because there's no "self" object there. I suspect there are probably other issues running in a node-ish environment as well.

Remote timeouts on load

No idea what the cause is yet, just reporting that my quick attempt to switch over to d-s-w using your demo servers resulted in timeout errors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.