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

[BUG] update of uint8arrays in did-jwt breaks multiple projects #135

Closed
nklomp opened this issue May 23, 2023 · 12 comments · Fixed by #142
Closed

[BUG] update of uint8arrays in did-jwt breaks multiple projects #135

nklomp opened this issue May 23, 2023 · 12 comments · Fixed by #142
Labels
bug Something isn't working released

Comments

@nklomp
Copy link
Member

nklomp commented May 23, 2023

IMO a new major version should have been released for did-jwt-vc when the move to ESM was made for did-jwt.
The latest update to did-jwt is including a newer uint8arrays that now breaks multiple of our projects. Problem is of course that in a lot of projects the deps are not exact deps in package.json, meaning that the latest 7.x version of DID-JWT will be used.

The errors we are seeing across different projects:
No "exports" main defined in /opt/node/node-v18.16.0-linux-x64/lib/node_modules/@sphereon/gx-agent-cli/node_modules/did-jwt-vc/node_modules/uint8arrays/package.json

Probably the easiest fix is to downgrade uint8arrays in did-jwt. I created the bug-report here, because IMO a bit more care should have been taken when releasing this library and then including a major new version of a really important dep, without changing the major version of this project.

@nklomp nklomp added the bug Something isn't working label May 23, 2023
@shehinfn
Copy link

shehinfn commented May 24, 2023

same issue for me what version i need to downgrade to

@tangzijun
Copy link

Any progress on this issue?

@stale
Copy link

stale bot commented Aug 18, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 18, 2023
@tahpot
Copy link
Contributor

tahpot commented Aug 23, 2023

We have hit this issue

@stale stale bot removed the stale label Aug 23, 2023
@nick-verida
Copy link

For everyone else who hits this, you can use yarn resolutions to work around it. It's a hack, but until it is fixed in this project do this in your package.json:

  "resolutions": {
    "did-jwt-vc": "3.1.0"
  }

If you aren't using yarn then good luck - this won't fix it.

@toteto
Copy link

toteto commented Oct 5, 2023

Facing the same issue. Anyone proposing a fix? Would like to avoid downgrade.

@mirceanis
Copy link
Member

We can probably downgrade uint8arrays to v3.1.1 in did-jwt to ameliorate these issues but I suspect you will be facing more issues like this going forward as more libs are switching to pure-ESM builds.

If you have some spare cycles, please raise a PR with the downgrade.

Note that there are usable configs for expo, jest, nodejs, and most other environments that should allow you to use ESM libraries.

@nacho-villanueva
Copy link

Any updates on this? I really need to use this lib

@mmatteo23
Copy link

@nacho-villanueva maybe I can help u. Following @nick-verida and @mirceanis comments I'm able to use did-jwt lib and avoid that error (you can give it a try also for did-jwt-vc which uses exactly did-jwt inside).

If you use yarn you can write these resolutions in your package.json file:

"resolutions": {
    "uint8arrays": "3.1.1",
    "multiformats": "9.4.2"
}

I know that this is a big downgrade of versions, but if you have development purposes, it could work for now.

@nacho-villanueva
Copy link

nacho-villanueva commented Oct 30, 2023

@mmatteo23 Yup. In npm I did this and it worked. I needed it for something I'm doing for my thesis, so as long as it works, it's good for me. Thanks!

"overrides": {
    "uint8arrays": "3.1.1"
  },

@mirceanis
Copy link
Member

As stated earlier, the "easy fix" is downgrading the dependencies in did-jwt.
I created an issue and a PR for this there. Please voice your opinion if you prefer or opose a downgrade.

mirceanis added a commit that referenced this issue Nov 1, 2023
uport-automation-bot pushed a commit that referenced this issue Nov 1, 2023
## [3.2.14](3.2.13...3.2.14) (2023-11-01)

### Bug Fixes

* **deps:** Update dependency did-jwt to v7.4.5 ([#142](#142)) ([e15adb9](e15adb9)), closes [#135](#135)
@uport-automation-bot
Copy link
Collaborator

🎉 This issue has been resolved in version 3.2.14 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants