Questions tagged [js-ipfs]

The JavaScript implementation of the IPFS (InterPlanetary File System) protocol.

IPFS logo

The InterPlanetary File System is a hypermedia distribution protocol, addressed by content and identities. It enables the creation of completely distributed applications.

IPFS aims to make the web faster, safer, and more open by connecting all computing devices with the same system of files.

js-ipfs provides a library which enables users to spin up full IPFS nodes from JavaScript. It runs in the command line, or in the browser.

Latest release of js-ipfs is 0.54.4. Read more about the latest release at https://github.com/ipfs/js-ipfs/releases

js-ipfs documentation: https://github.com/ipfs/js-ipfs/tree/master/docs

95 questions
0
votes
1 answer

How to get file path or upload_id with ipfs.addAll()

I have progress UI which gets files path and updates progress by file upload_id. But in ipfs.addAll function is not returning id or something to show correctly progress. I mapped files to progress id it repeats every time not working as expected.…
Vaqif
  • 585
  • 1
  • 5
  • 16
0
votes
1 answer

InvalidValueError: The ipfs-repo-migrations package does not have all migration to migrate from version 10 to 11 at verifyAvailableMigrations

I get this error: InvalidValueError: The ipfs-repo-migrations package does not have all migration to migrate from version 10 to 11 at verifyAvailableMigrations when I try to spin up ipfs-coord. Please does anyone have an idea on what I should do?…
0
votes
1 answer

js-ipfs adding file to a node not correctly working

Hello please help me with this guys The add method not adding file to directory This is current status c.files.mkdir("metadata") c.add([{path:"/metadata/0.json", content:""}]).then((r)=>console.log(r)) This is returned json object { path:…
0
votes
1 answer

How to upload file to IPFS by keeping same CID

Store 2 image in IPFS and pin it. The IPFS URI should be like ipfs://ipfs.io/hashCID/O.png ipfs://ipfs.io/hashCID/1.png Here hashCID should be same. Just change the next token id and you should be able to retrieve the image.
Kartik ganiga
  • 390
  • 4
  • 12
0
votes
1 answer

UnhandledPromiseRejectionWarning: InvalidRepoVersionError: Incompatible repo versions. (IPFS-JS 0.55.3)-(NODE JS 14.17.0)

I just learned about ipfs js, and the version I have installed is version 0.55.3 (https://www.npmjs.com/package/ipfs), besides I'm also using node js with version 14.17.0 (LTS) and MacOS BigSur 11.4 When I follow the tutorial on the link…
0
votes
1 answer

TypeError: fs.stat is not a function (IPFS JS)

I'm learning ipfs js based on the tutorial, but while I'm following I'm having trouble typing node main.js in the terminal like this: /Users/username/Documents/coding/ipfs-test/node_modules/lock-me/src/unix.js:9 (cb) => fs.stat(name, (err,…
0
votes
0 answers

2 Jquery ajax post requests. 2nd one gives error: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client

I have one GET request at first to retrieve a data structure. Then I perform some changes and perform a PUT request to send the data structure to the server and update the record. When I click the submit button on the on the first form it works as…
0
votes
1 answer

IPFS-JS with "npx create-react-app" causes a Webpack Error

So I created a new React Project with npx create-react-app I added yarn add ipfs I added it to the React project ... const createClient = require("ipfs"); function App() { ... And I get the error TypeError: TextDecoder is not a constructor I…
0
votes
1 answer

IPFS repository not found haadcode/ipfs-pubsub-room.git

I'm following the read me instructions at https://github.com/redacademy/vue-ethereum-ipfs I got to the point of doing npm install and get: /usr/bin/git ls-remote -h -t ssh://git@github.com/haadcode/ipfs-pubsub-room.git ERROR: Repository not…
0
votes
1 answer

How do I make the IPFS add await wait before proceeding?

Await does not wait for IPFS add function. I am trying to add files to IPFS, then output a JSON of the file name corresponding to the HASH. But the await just never wait and output an empty file.(Or console log an undefined) const IPFS =…
Christopher
  • 142
  • 7
0
votes
0 answers

Inserting data in private ipfs network from outside of server throws timeout error

I installed private ipfs network on my server and after that i tested it with entering a file and getting it which works perfectly,now when i try to follow the same steps from my local machine,getting data is working with the url - http://{server's…
Abhishek
  • 1
  • 2
0
votes
1 answer

"POST http://localhost:9090/spawn ERR_CONNECTION_REFUSED" error while spawning an IPFS daemon using ipfsd-ctl

I'm trying to Spawn an IPFS daemon from the Browser using the provided remote endpoint using the ipfsd-ctl library. This is the link I'm referring // Start a remote disposable node, and get access to the api // print the node id, and stop the…
0
votes
2 answers

"multihash must be a buffer" error while trying to upload files to ipfs using ipfs.add()

I'm trying to spawn a ipfs node and upload a file to ipfs. But the ipfs.add() method always throws the error "multihash must be a buffer". Googling suggests that the isBuffer check in node's multihash package is the problem but doesn't provide a…
0
votes
1 answer

In an electron app just importing libp2p in main.ts causes "self is not defined"

In in electron app just importing libp2p in main.ts : const Libp2p = require('libp2p'); causes this error: A JavaScript error occurred in the main process Uncaught Exception: ReferenceError: self is not defined at…
Raphael10
  • 2,508
  • 7
  • 22
  • 50
0
votes
1 answer

How to access my IPFS node instance from my express router

I can't seem to work out the correct approach for running a IPFS node in my express app (/services/IPFS.js), while also being able to access it within my routes (/routes/uploads.js) /services/IPFS.js const IPFS =…
coeu5a
  • 175
  • 1
  • 3
  • 14