orbitdb / web3-workshop

A workshop showing how to build a basic app using OrbitDB
MIT License
25 stars 8 forks source link

Module not found: Error: Can't resolve 'multicodec/src/name-table' #8

Open siman opened 4 years ago

siman commented 4 years ago

I checked out the branch 6-play-track and run these commands:

yarn
yarn start

Output:

ERROR in ./node_modules/ipfs-bitswap/src/types/message/index.js
Module not found: Error: Can't resolve 'multicodec/src/name-table' in '/Users/siman/Work/df/hackfs/orbitdb/web3-workshop/node_modules/ipfs-bitswap/src/types/message'
 @ ./node_modules/ipfs-bitswap/src/types/message/index.js 17:18-54
 @ ./node_modules/ipfs-bitswap/src/decision-engine/index.js
 @ ./node_modules/ipfs-bitswap/src/index.js
 @ ./node_modules/ipfs/src/core/components/start.js
 @ ./node_modules/ipfs/src/core/components/index.js
 @ ./node_modules/ipfs/src/core/index.js
 @ ./index.js
Child html-webpack-plugin for "index.html":
     1 asset
    Entrypoint undefined = index.html
    [./node_modules/html-webpack-plugin/lib/loader.js!./index.html] 411 bytes {0} [built]
    [./node_modules/lodash/lodash.js] 530 KiB {0} [built]
    [./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 475 bytes {0} [built]
    [./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 546 bytes {0} [built]
ℹ 「wdm」: Failed to compile.
tijsmaas commented 3 years ago

Caused by a breaking change between multicodec 0.5.0 and 0.5.5, installing multicodec 0.5.0 resolved it for me.

npm install multicodec@0.5.0
kvutien commented 3 years ago

Thank you very much. @tijsmaas -- Your hint worked for me too. It is funny that multicodec and multihash have been introduced to avoid breaking changes in encoding, and kaboom, the npm package to decode multicodec introduces breaking changes in itself :-)

silkroadnomad commented 2 years ago

should be solved in latest PR merge.

aphelionz commented 2 years ago

PRs were merged, please confirm the fix