Description
- Version:
- Platform:
- Subsystem:
Type: Bug
Severity: High
Description:
I found this error testing the experimental aegir build, still don't know why this happens, minified and un-minified bundles give the same error so it isn't terser (the new uglify) might be babel changing constructor name needs further investigation.
Still using constructor.name should be avoided reference below.
Using a minified bundle this line https://github.com/libp2p/js-libp2p/blob/master/src/index.js#L362 gives an error
Uncaught Error: There is already a transport with this key
at TransportManager.add (transport.js:37)
at index.js:362
at parallel.js:31
at replenish (eachOfLimit.js:66)
at iterateeCallback (eachOfLimit.js:50)
at onlyOnce.js:12
at Switch. (parallel.js:36)
at Switch.g (events.js:165)
at Switch.EventEmitter.emit (events.js:78)
at EventEmitter. (index.js:109)
Steps to reproduce the error:
in the index.html at the bottom change this line
<script src="https://unpkg.com/ipfs-hd@next"></script>to
<script src="https://unpkg.com/ipfs-hd/dist/ipfs.js"></script> for un minified sourceor
<script src="https://unpkg.com/ipfs/dist/index.js"></script> for the current ipfs bundle which works