Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Missing deps cause problems with esm.sh #158

Closed
achingbrain opened this issue Dec 29, 2023 · 1 comment
Closed

Missing deps cause problems with esm.sh #158

achingbrain opened this issue Dec 29, 2023 · 1 comment

Comments

@achingbrain
Copy link
Member

@helia/ipns imports from @libp2p/interface:

import { CodeError } from '@libp2p/interface/errors'

..but @libp2p/interface is only declared as a dev dep.

I think this has made esm.sh use the latest version of @libp2p/interface instead:

https://esm.sh/@helia/ipns@3.0.1

/* esm.sh - @helia/ipns@3.0.1 */
import "/v135/@libp2p/interface@1.0.2/es2022/errors.js";
import "/v135/@libp2p/logger@3.1.0/es2022/logger.mjs";
import "/v135/@libp2p/peer-id@3.0.6/es2022/peer-id.mjs";

It tries to load:

https://esm.sh/v135/@libp2p/interface@1.0.2/es2022/errors.js

..which uses @libp2p/interface@1.0.2 but the depended on version is 0.1.4 - this resource exists:

https://esm.sh/v135/@libp2p/interface@0.1.4/es2022/errors.js

The solution here is to make sure the correct dependencies are declared.

Unfortunately depcheck (the package behind the aegir dep-check command) doesn't support throwing errors for missing dependencies when they are in the devDependencies section of package.json as is the case here, at least, it didn't when aegir was switched to use it, that may have changed since then.

achingbrain added a commit that referenced this issue Dec 29, 2023
This should be a dep not a dev dep.

Refs #158
achingbrain added a commit that referenced this issue Dec 29, 2023
This should be a dep not a dev dep.

Refs #158
@achingbrain
Copy link
Member Author

Fixed in #159, regressions should be prevented by ipfs/aegir#1426

github-actions bot pushed a commit that referenced this issue Jan 8, 2024
## [@helia/ipns-v4.0.0](https://github.com/ipfs/helia-ipns/compare/@helia/ipns-v3.0.1...@helia/ipns-v4.0.0) (2024-01-08)

### ⚠ BREAKING CHANGES

* uses multiformats v13 and helia v3, renames `dht` routing to `libp2p`

### Features

* update helia to v3 and multiformats to v13 ([#167](#167)) ([a0381b9](a0381b9))

### Bug Fixes

* make @libp2p/interface a dependency ([#159](#159)) ([546ecf0](546ecf0)), closes [#158](#158)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant