Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nodejs tutorial not up to date with library: Error with DIDResolverPlugin #450

Closed
simibac opened this issue Apr 10, 2021 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@simibac
Copy link

simibac commented Apr 10, 2021

Bug severity
Please rate severity from 1-5, 1 being very minor and 5 being critical
3

Describe the bug
Cannot create a DIDResolverPlugin when following the Nodejs tutorial.

To Reproduce
Follow the steps of the Nodejs tutorial. The error occurs when trying to run the script/

Observed behaviour

TSError:  Unable to compile TypeScript

src/veramo/setup.ts:69:9 - error TS2322: Type 'import("<absolutepath>").DIDResolver' is not assignable to type 'import("<absolutepath>").DIDResolver'.

Expected behaviour
List all identifiers when running the script.

Details
It seems that the interface for creating the DIDResolverPlugin has changed:

new DIDResolverPlugin({
      resolver: new Resolver({
        ethr: ethrDidResolver({
          networks: [
            {
              name: "rinkeby",
              rpcUrl: "https://rinkeby.infura.io/v3/" + INFURA_PROJECT_ID,
            },
          ],
        }).ethr,
        web: webDidResolver().web,
      }),
    }),

Versions (please complete the following information):

  "dependencies": {
    "@veramo/core": "^1.1.0",
    "@veramo/credential-w3c": "^1.1.0",
    "@veramo/data-store": "^1.1.0",
    "@veramo/did-manager": "^1.1.0",
    "@veramo/did-provider-ethr": "^1.1.0",
    "@veramo/did-provider-web": "^1.1.0",
    "@veramo/did-resolver": "^1.1.0",
    "@veramo/key-manager": "^1.1.0",
    "@veramo/kms-local": "^1.1.0",
    "ethr-did-resolver": "^4.0.1",
    "sqlite3": "^5.0.2",
    "web-did-resolver": "^2.0.4"
  }
  • Node Version v14.9.0
@simibac simibac added the bug Something isn't working label Apr 10, 2021
@mirceanis
Copy link
Member

Hey, @simibac
The latest major versions of ethr-did-resolver and web-did-resolver have been updated to match the latest did core spec. This meant introducing some breaking changes that prevents them from being used with @veramo/*@1.1.0.

The upcoming major release of veramo will fix this, but until then you will need to use the veramo packages from the @next channel, like so:

yarn add @veramo/core@next @veramo/credential-w3c@next @veramo/did-resolver@next ....

Otherwise, if you wish to keep using [email protected], please downgrade to ethr-did-resolver@3 and web-did-resolver@1.

Please close this issue if this solution works for you.
Thanks for reporting this!

@simibac simibac closed this as completed Apr 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants