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

Qwik type definitions are not exported in package.json #349

Closed
5 tasks done
totto2727 opened this issue Feb 21, 2024 · 1 comment · Fixed by #350
Closed
5 tasks done

Qwik type definitions are not exported in package.json #349

totto2727 opened this issue Feb 21, 2024 · 1 comment · Fixed by #350
Labels
bug Something isn't working

Comments

@totto2727
Copy link

Describe the bug

I searched Qwik and confirmed that there is no corresponding Issue.

Currently, there is no export of the Qwik type definition file in package.json.
This causes an error when configuring tsconfig.json according to the documentation, as it does not recognize the type definition file.

". /node_modules/unplugin-icons/types/qwik" will work properly, so it is almost certainly a misconfiguration in package.json.

If you add the following to the exports field in package.json, it should work correctly with the configuration as documented.

    "./types/qwik": {
      "types": "./types/qwik.d.ts"
    }

Issue before submitting the PR.

Should I submit a PR on my end?

Rerated PR

https://github.com/unplugin/unplugin-icons/pull/262/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519

Reproduction

https://stackblitz.com/edit/vitejs-vite-uv7rug?file=package.json

System Info

❯ npm run build

> vite-qwik@0.0.0 build
> tsc && vite build

error TS2688: Cannot find type definition file for 'unplugin-icons/types/qwik'.
  The file is in the program because:
    Entry point of type library 'unplugin-icons/types/qwik' specified in compilerOptions

  tsconfig.json:24:15
    24     "types": ["unplugin-icons/types/qwik"]
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    File is entry point of type library specified here.


Found 1 error.

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
Copy link

stackblitz bot commented Feb 21, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@userquin userquin added the bug Something isn't working label Feb 21, 2024
@antfu antfu closed this as completed in #350 Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants