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

fix: mdoc fixes #2071

Merged

Conversation

TimoGlastra
Copy link
Contributor

Two fixes for mdoc:

  • update mdoc client to fix react native issues
  • proper handling of cose_key (gave issues with BDR pid issuer)

Signed-off-by: Timo Glastra <[email protected]>
Copy link

changeset-bot bot commented Oct 29, 2024

⚠️ No Changeset found

Latest commit: 4efd105

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@TimoGlastra TimoGlastra merged commit 5898754 into openwallet-foundation:main Oct 29, 2024
13 of 14 checks passed
@TimoGlastra TimoGlastra deleted the fix/mdoc-cose-key branch October 29, 2024 05:43
@nodlesh
Copy link

nodlesh commented Oct 30, 2024

We have been having an Mdoc error running our Credo Backchannel/Agent in the Interop Tests in OATH. Will this fix solve this problem or is this a new issue?

[31m/src/node_modules/@credo-ts/core/build/modules/mdoc/Mdoc.js:4
const mdoc_client_1 = require("@protokoll/mdoc-client");
                      ^�[39m
�[31mError [ERR_REQUIRE_ESM]: require() of ES Module /src/node_modules/@protokoll/mdoc-client/dist/cjs/src/index.js from /src/node_modules/@credo-ts/core/build/modules/mdoc/Mdoc.js not supported.
index.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules.
Instead either rename index.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in /src/node_modules/@protokoll/mdoc-client/package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).

    at Object.<anonymous> �[90m(/src/�[39mnode_modules/�[4m@credo-ts�[24m/core/build/modules/mdoc/Mdoc.js:4:23�[90m)�[39m {
  code: �[32m'ERR_REQUIRE_ESM'�[39m
}�[39m

@TimoGlastra
Copy link
Contributor Author

No, but it's weird that you get that error as the library it's complaining about is not a module.

Probably something related to ts-node 🤔

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

Successfully merging this pull request may close these issues.

2 participants