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

does not provide an export named 'default' #131

Open
riebeb opened this issue Nov 2, 2022 · 4 comments
Open

does not provide an export named 'default' #131

riebeb opened this issue Nov 2, 2022 · 4 comments

Comments

@riebeb
Copy link

riebeb commented Nov 2, 2022

import vc from '@digitalbazaar/vc';
^^
SyntaxError: The requested module '@digitalbazaar/vc' does not provide an export named 'default'

What am I missing? Thanks!

@riebeb
Copy link
Author

riebeb commented Nov 2, 2022

was using https://gitlab.com/gaia-x/gaia-x-community/gaia-x-catalogue/catalogue-prototyping

which uses require() and package.json with "dependencies": {
"@digitalbazaar/ed25519-signature-2020": "^3.0.0",
"@digitalbazaar/ed25519-verification-key-2020": "^3.2.0",
"@digitalbazaar/vc": "github:digitalbazaar/vc-js",

but i guess this is not working anymore because this is an esm only package now?

@miguelnietoa
Copy link

I'm facing the same issue. @riebeb, were you able to make it work somehow?

@davidlehn
Copy link
Member

There isn't a default export anymore. You can pull in everything with:

import * as vc from '@digitalbazaar/vc';

or just the functions you need like:

import {issue, verifyCredential} from '@digitalbazaar/vc';

Looks like the README needs some updates.

@miguelnietoa
Copy link

Great, thank you! @davidlehn
And yes, README needs to be updated 👌🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants