Skip to content
This repository has been 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 opened this issue May 9, 2019 · 2 comments · Fixed by #2033
Closed

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

MicrowaveDev opened this issue May 9, 2019 · 2 comments · Fixed by #2033
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) P3 Low: Not priority right now

Comments

@MicrowaveDev
Copy link
Contributor

  • 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: { }
    });
@alanshaw alanshaw added kind/bug A bug in existing code (including security flaws) exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue P3 Low: Not priority right now status/ready Ready to be worked labels May 10, 2019
@alanshaw
Copy link
Member

Thanks for reporting, any chance you could send a PR to fix this up for us @Jonybang?

@MicrowaveDev
Copy link
Contributor Author

@alanshaw i think i could. I will try

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue kind/bug A bug in existing code (including security flaws) P3 Low: Not priority right now
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants