ipfs / js-ipfs

IPFS implementation in JavaScript
https://js.ipfs.tech
Other
7.44k stars 1.25k forks source link

TypeError: Object(...) is not a function for create method #4199

Closed shubham-2702 closed 1 year ago

shubham-2702 commented 2 years ago

I have set up ipfs on my windows 64 bit system, and i have the ipfs daemon running in the terminal, and the API server listening on /ip4/127.0.0.1/tcp/5001 Screenshot (61)

Now i am trying the example at https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#example But that results in the following error

const ipfs = create() TypeError: create is not a function at Object. C:/Users/shubh/Downloads/Agriculture-Supply-Chain-Management/Delivery/src/components/ipfs.js:2

Also, with await keyword before ipfs.add , it's not compiling but that's written in the example. I am using node version 16.13.1

welcome[bot] commented 2 years ago

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

Finally, remember to use https://discuss.ipfs.io if you just need general support.

achingbrain commented 1 year ago

Can you please provide a small reproduction repo?

I think this is down to your webpack config - you can see some working config here.

github-actions[bot] commented 1 year ago

Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 7 days.

github-actions[bot] commented 1 year ago

This issue was closed because it is missing author input.