Unable to set dagJose codec for IPFS

Hello all. In https://www.npmjs.com/package/@ceramicnetwork/core

const ipfs = createIPFS({
ipld: { codecs: [dagJose] },

Gives the error:
Type ‘{ codecs: (typeof dagJose)[]; }’ is not assignable to type ‘Partial’.
Object literal may only specify known properties, and ‘codecs’ does not exist in type ‘Partial’.ts(2322)
types.d.ts(102, 3): The expected type comes from property ‘ipld’ which is declared here on type ‘Options’

Is there a new way to write this?

const ipfs = createIPFS({ ipld: { formats: [dagJose] }, }) this could be better. there still is the error “Type 'typeof import(”/home/ubuntu/node_modules/dag-jose/lib/index")’ is missing the following properties from type ‘Format’: codec, defaultHashAlg, …"

1 Like

Hey @bshambaugh, welcome to the forum, and sorry for the super late response.

Looks like that code snippet from the README is outdated :frowning:

I’m assuming you’re trying to launch a go-ipfs instance alongside the Ceramic daemon?

Any updates? I’m getting the same error.

Hi @0xde21750cf3A76931bA, can you try using createIPFS(), i.e. without any parameters?

1 Like