Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

UnhandledPromiseRejectionWarning: InvalidRepoVersionError: Incompatible repo versions. (IPFS-JS 0.55.3)-(Node Js 14.17.0) #3712

Closed
@adam12121997

Description

@adam12121997

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 https://github.com/ipfs/js-ipfs/tree/master/examples/ipfs-101 I always get an error like this:

(node:9857) UnhandledPromiseRejectionWarning: InvalidRepoVersionError: Incompatible repo versions. Automatic migrations disabled. Please migrate the repo manually.
    at IpfsRepo.open (/Users/username/Documents/program/ipfs-node-10/node_modules/ipfs-repo/src/index.js:142:17)
    at async loadRepo (/Users/username/Documents/program/ipfs-node-10/node_modules/ipfs-core/src/components/storage.js:74:5)
    at async Function.start (/Users/username/Documents/program/ipfs-node-10/node_modules/ipfs-core/src/components/storage.js:54:41)
    at async Object.create (/Users/username/Documents/program/ipfs-node-10/node_modules/ipfs-core/src/components/index.js:223:21)
    at async main (/Users/username/Documents/program/ipfs-node-10/index.js:4:16)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:9857) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:9857) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

And here is the code from my index.js:

const IPFS = require('ipfs')

async function main () {
  const node = await IPFS.create()
  const version = await node.version()

  console.log('Version:', version.version)
  // ...
}

main()

And this is my package.json:

{
  "name": "ipfs-node-10",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "dependencies": {
    "ipfs": "^0.55.3"
  }

Can you help me to find a solution to this problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    need/triageNeeds initial labeling and prioritization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions