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.

Type error on current HEAD #3527

Closed
@vmx

Description

@vmx

Severity: High

Description:

npm install errors. From the output I can't tell if it's a fatal error (and the installation actually works) or if it's an error that can be ignored.

I checked the source out and ran npm install. It failed with

> ipfs-core@0.5.1 prepare /tmp/js-ipfs/packages/ipfs-core
> aegir build --no-bundle

src/components/block/put.js:85:46 - error TS2345: Argument of type 'Uint8Array | Block' is not assignable to parameter of type 'Uint8Array'.
  Type 'Block' is missing the following properties from type 'Uint8Array': BYTES_PER_ELEMENT, buffer, byteLength, byteOffset, and 26 more.

85         const multihash = await multihashing(block, mhtype)
                                                ~~~~~


Found 1 error.

Command failed with exit code 2: tsc --build /tmp/js-ipfs/packages/ipfs-core/tsconfig-types.aegir.json
lerna info lifecycle ipfs-core@0.5.1~prepare: Failed to exec prepare script

When I run $ npx aegir build --no-bundle directly in packages/ipfs-core, I get the same error. tsc is at version 4.1.3.

I expected that an npm install is successful.

Steps to reproduce the error:

$ git clone https://github.com/ipfs/js-ipfs 
$ cd js-ipfs
$ npm install

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugA bug in existing code (including security flaws)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions