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

Build output is missing the index.d.cts file causing typescript to fail #2098

Closed
1 task
aorsten opened this issue Jan 13, 2025 · 0 comments · Fixed by #2114
Closed
1 task

Build output is missing the index.d.cts file causing typescript to fail #2098

aorsten opened this issue Jan 13, 2025 · 0 comments · Fixed by #2114
Labels
bug Something isn't working openapi-react-query Relevant to openapi-react-query

Comments

@aorsten
Copy link

aorsten commented Jan 13, 2025

openapi-react-query version

0.2.9

Description

The build output is missing the .d.cts file for Require.types settings in package.json.

Reproduction

Trying to

import { createClient } from 'openapi-react-query'
// Could not find a declaration file for module 'openapi-react-query'. '.../node_modules/openapi-react-query/dist/index.cjs' implicitly has an 'any' type.

From package.json I see:

  "exports": {
    ".": {
      "import": {
        "types": "./dist/index.d.ts",
        "default": "./dist/index.js"
      },
      "require": {
        "types": "./dist/index.d.cts", // THIS SETTING
        "default": "./dist/index.cjs"
      }
    },
    "./*": "./*"
  },

But it does not exist in node modules (openapi-fetch for comparison):

image

Expected result

I am unsure how exactly to fix this, but clearly for me the file is missing from the build output. Can you add it?

Extra

@aorsten aorsten added bug Something isn't working openapi-react-query Relevant to openapi-react-query labels Jan 13, 2025
@kerwanp kerwanp linked a pull request Jan 23, 2025 that will close this issue
@alumni alumni mentioned this issue Mar 4, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working openapi-react-query Relevant to openapi-react-query
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant