Skip to content
This repository was archived by the owner on Aug 29, 2023. It is now read-only.
This repository was archived by the owner on Aug 29, 2023. It is now read-only.

Type error: @libp2p/tcp not compatible with libp2p #194

@eleijonmarck

Description

@eleijonmarck

What happened:
I am following the getting started tutorial https://docs.libp2p.io/tutorials/getting-started/javascript/ to step Transports and getting a type error from a minimal example.

What is expected:
To be able to run the code without issues.

Reproduced minimal code example: https://stackblitz.com/edit/node-dsuzra?file=index.ts

import { createLibp2p } from 'libp2p';
import { TCP } from '@libp2p/tcp';

const main = async () => {
  const tcp = new TCP();
  const node = await createLibp2p({
    transports: [tcp],
  });
};

main();
// package.json
{
  "name": "node-starter",
  "version": "0.0.0",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "dependencies": {
    "@libp2p/tcp": "^3.0.2",
    "libp2p": "^0.37.3",
    "typescript": "^4.7.4"
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions