ceramicnetwork / ceramicnetwork/js-ceramic
Error: Cannot find module 'multicodec/src/base-table.json' - yarn
- Dominant language
- TypeScript
- Stars
- 423
- Forks
- 126
- PR merge metrics
- No merged PRs in 30d
Description
the way modules are hoisted & imported can mean that cids ends up referencing the wrong version multicodec.
My modules are as below
```
docid
CN/docid@0.4.6
- multicodec@2.0.0
cids@1.0.2
multicodec@2.1.0
```
cids@1.0.2 depends on multicodec "^2.0.1". The issue is that when cids requires multicodec, it gets v2.1.0. In this version, base-table.js exists but not base-table.json. This is confirmed by yarn.lock:
```
multicodec@^2.0.0, multicodec@^2.0.1, multicodec@^2.1.0:
version "2.1.0"
```
docid (I assume) specifies multicode explicitly despite not using it anywhere because tries to force CIDS to import the correct version. https://github.com/ceramicnetwork/js-ceramic/blob/8cf3a0b76ed9c9b9a33df88ed5e8af34d32a47c1/packages/docid/package.json#L30 However, because cids has been hoisted it has escaped the scope of the docid/node_modules and does not reference the intended version.
Upgrading cids to a more recent version will fix this issue.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.