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: corrects "Could not find a declaration file for module '@ory/elements'" error #131

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

dmitrigrabov
Copy link
Contributor

Using exports in package.json means the types field is no longer used and types cannot be imported and results in the error below. I have added a types property to exports field to fix the issue

Could not find a declaration file for module '@ory/elements'. ‘XXXX/node_modules/@ory/elements/dist/index.mjs' implicitly has an 'any' type.
  There are types at ‘XXXX/node_modules/@ory/elements/dist/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@ory/elements' library may need to update its package.json or typings.ts(7016)

See https://www.typescriptlang.org/docs/handbook/esm-node.html#packagejson-exports-imports-and-self-referencing for details.

The original types fields are left in place for use by older versions of Typescript.

Checklist

  • I have read the contributing guidelines and signed the CLA.
  • I have referenced an issue containing the design document if my change introduces a new feature.
  • I have read the security policy.
  • I confirm that this pull request does not address a security vulnerability.
    If this pull request addresses a security vulnerability,
    I confirm that I got approval (please contact security@ory.sh) from the maintainers to push the changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added the necessary documentation within the code base (if appropriate).

@dmitrigrabov dmitrigrabov changed the title Fixes "Could not find a declaration file for module '@ory/elements'" error fix: Fixes "Could not find a declaration file for module '@ory/elements'" error Aug 27, 2023
@dmitrigrabov dmitrigrabov changed the title fix: Fixes "Could not find a declaration file for module '@ory/elements'" error fix: corrects "Could not find a declaration file for module '@ory/elements'" error Aug 27, 2023
Copy link
Contributor

@Benehiko Benehiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution! :)

@Benehiko Benehiko merged commit 85546a1 into ory:main Aug 28, 2023
6 of 8 checks passed
@dmitrigrabov
Copy link
Contributor Author

@Benehiko when do you expect to be able to release this update?

@Benehiko
Copy link
Contributor

We'll probably do another release sometime this week.

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.

None yet

2 participants