Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

ERR_MODULE_NOT_FOUND when building with TS, new in ipfs-core v0.18.0 #4323

Closed
libp2p/js-libp2p-prometheus-metrics
#32
@npfoss

Description

@npfoss
  • Version: 0.18.0
  • Platform: Darwin Nates-MacBook-Pro.local 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000 arm64
    NodeJS v16.10.0
  • Subsystem: ipfs-core

Severity: Medium?

Description:

Can't upgrade from v0.17.0 (builds and runs fine) to v0.18.0 of ipfs-core: tsc -b errors with

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'prom-client' imported from [...]/node_modules/@libp2p/prometheus-metrics/dist/src/index.js

Steps to reproduce the error:

typescript version: 4.9.5

code (simplified)

import { create as createIpfsNode, IPFS } from "ipfs-core";
const ipfs = createIpfsNode();

tsconfig.json (simplified)

{
  "display": "Node 16",
  "compilerOptions": {
    "lib": ["es2021", "dom"],
    "module": "ES2020",
    "target": "ES2015",
    "moduleResolution": "node",
}

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions