ory / elements

Ory Elements is a component library that makes building login, registration and account pages for Ory a breeze. Check out the components library on Chromatic https://www.chromatic.com/library?appId=63b58e306cfd32348fa48d50
https://ory.sh
Apache License 2.0
85 stars 44 forks source link

fix: corrects "Could not find a declaration file for module '@ory/elements'" error #131

Closed dmitrigrabov closed 1 year ago

dmitrigrabov commented 1 year ago

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

dmitrigrabov commented 1 year ago

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

Benehiko commented 1 year ago

We'll probably do another release sometime this week.