2

Is there an issue with IPFS. nothing works

I get this ERROR when running ipfs daemon

2022-11-05T01:21:38.715+0100 ERROR tcp-tpt tcp/tcp.go:59 failed set keepalive period {"error": "set tcp4 192.168.1.6:4001->34.211.25.159:41218: setsockopt: invalid argument"}

import * as IPFS from 'ipfs-core'

const setURI = async (file, callback) => {
  try {
    const ipfs = await IPFS.create()
    const { cid } = await ipfs.add(file)
    console.info(cid)
   // callback(url)
  } catch (error) {
    console.error('Error uploading file: ', error)
  }  
}
export {
    setURI
}

1 Answer 1

2

This is a bug in the latest version of Babel: https://github.com/babel/babel/issues/15145

A workaround is to downgrade by adding this to package.json:

  "resolutions": {
    "@babel/plugin-transform-async-to-generator": "7.17.12"
  },

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you. good to know. I finally switched to pinata SDK to handle the upload to IPFS

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.