- Version: 0.25.0-rc.4
- Platform: Node.js for Windows 10 / Ubuntu 16.04 LTS (on Windows 10) - 64bit
- Subsystem: pubsub
Type: Bug
Severity: Low
Description: The PubSub example ends with a TypeError:
C:\Users\Patrick\Desktop\libp2p\node_modules\superstruct\lib\index.js:1181
throw new StructError(error);
^
TypeError: Expected a value of type `function | object` but received `undefined`.
at Function.Struct.assert.value [as assert] (C:\Users\Patrick\Desktop\libp2p\node_modules\superstruct\lib\index.js:1181:15)
at Struct (C:\Users\Patrick\Desktop\libp2p\node_modules\superstruct\lib\index.js:1165:21)
at module.exports.validate (C:\Users\Patrick\Desktop\libp2p\src\config.js:73:27)
at new Node (C:\Users\Patrick\Desktop\libp2p\src\index.js:48:16)
at new MyBundle (C:\Users\Patrick\Desktop\libp2p\examples\pubsub\1.js:37:5)
at waterfall (C:\Users\Patrick\Desktop\libp2p\examples\pubsub\1.js:48:14)
at nextTask (C:\Users\Patrick\Desktop\libp2p\node_modules\async\waterfall.js:16:14)
at next (C:\Users\Patrick\Desktop\libp2p\node_modules\async\waterfall.js:23:9)
at C:\Users\Patrick\Desktop\libp2p\node_modules\async\internal\onlyOnce.js:12:16
at PeerId.create (C:\Users\Patrick\Desktop\libp2p\node_modules\peer-info\src\index.js:47:7)
Steps to reproduce the error:
- Clone js-libp2p trunk to desktop.
- In cloned folder run
npm install to install all dependencies.
- Run
npm audit fix to attempt to fix 3 low-priority vulnerabilities. Result:
npm WARN acorn-dynamic-import@4.0.0 requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN acorn-jsx@5.0.1 requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN wrtc@0.3.5 requires a peer of domexception@^1.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
fixed 0 of 3 vulnerabilities in 44953 scanned packages
3 vulnerabilities required manual review and could not be updated
(I can update this issue with details on the reported vulnerabilities--please let me know if it's relevant)
- In
{trunk}\examples\pubsub run node 1.js (nodejs 1.js on Ubuntu) -- after a few moments the error is reported and example terminates.
Type: Bug
Severity: Low
Description: The PubSub example ends with a TypeError:
Steps to reproduce the error:
npm installto install all dependencies.npm audit fixto attempt to fix 3 low-priority vulnerabilities. Result:(I can update this issue with details on the reported vulnerabilities--please let me know if it's relevant)
{trunk}\examples\pubsubrunnode 1.js(nodejs 1.json Ubuntu) -- after a few moments the error is reported and example terminates.