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.

TypeError: Expected a value of type undefined for ipld but received {}. #2031

Closed
@MicrowaveDev

Description

@MicrowaveDev
  • Version: 0.35.0
  • Platform: Darwin mac.local 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64

Type: Bug

Severity: Medium

Description: Error on trying to pass ipld option as described in documentation

TypeError: Expected a value of type `undefined` for `ipld` but received `{}`.
      at Function.Struct.validate.value [as validate] (node_modules/superstruct/src/superstruct.js:78:17)
      at Object.validate (node_modules/ipfs/src/core/config.js:77:39)
      at new IPFS (node_modules/ipfs/src/core/index.js:47:22)
      at Object.<anonymous> (components/storage/js-ipfs/index.ts:22:18)
      at step (components/storage/js-ipfs/index.ts:44:23)
      at Object.next (components/storage/js-ipfs/index.ts:25:53)

Steps to reproduce the error:

const IPFS = require('ipfs');
const node = new IPFS({
        ipld: { }
    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low: Not priority right nowexp/noviceSomeone with a little familiarity can pick uphelp wantedSeeking public contribution on this issuekind/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