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

React package does not define "types" in "exports" #771

Closed
aplr opened this issue Feb 13, 2023 · 0 comments
Closed

React package does not define "types" in "exports" #771

aplr opened this issue Feb 13, 2023 · 0 comments
Assignees
Labels
bug Something isn't working react types

Comments

@aplr
Copy link

aplr commented Feb 13, 2023

Current Behavior:

The @vidstack/react package.json does not define "types" in its "exports" field.

I switched to ts 5 to test the new moduleResolution option bundler and hit the following error. I don't know if it has to do with the switch to ts 5, I believe it's also an error in ts 4 with moduleResolution set to nodenext. The error is valid anyways, I guess.

Could not find a declaration file for module '@vidstack/react'. '/Users/andreas/Developer/fruits/lime/node_modules/@vidstack/react/dist/server.js' implicitly has an 'any' type.
  There are types at '/Users/andreas/Developer/fruits/lime/node_modules/@vidstack/react/dist/types/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@vidstack/react' library may need to update its package.json or typings.ts(7016)

Expected Behavior:

The @vidstack/react package.json defines "types" in its "exports" field.

Steps To Reproduce:

  1. Use ts 5 & module resolution bundler (or probably also ts 4 and module resolution nodenext).
  2. Import @vidstack/react.
  3. Type error

Environment:

  • Framework: React
  • Meta Framework: Next.js
  • Node: 18
  • TS: 5
@aplr aplr added the bug Something isn't working label Feb 13, 2023
@mihar-22 mihar-22 added this to the Release 0.3.0 milestone Feb 13, 2023
@mihar-22 mihar-22 changed the title @vidstack/react package.json does not define "types" in its "exports" field React package does not define "types" in "exports" Feb 13, 2023
@mihar-22 mihar-22 self-assigned this Feb 13, 2023
mihar-22 added a commit that referenced this issue Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working react types
Projects
None yet
Development

No branches or pull requests

2 participants