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: avoid src in import path #1596

Merged
merged 2 commits into from
Sep 10, 2023
Merged

Conversation

harryzcy
Copy link
Contributor

@harryzcy harryzcy commented Sep 10, 2023

Related to #1595

📝 Description

To prevent src in import path in '*.d.ts', the types should be exported in index.ts.

Specifically, the following error is fixed:

node_modules/@nextui-org/button/dist/use-button.d.ts:1:52 - error TS2307: Cannot find module '@nextui-org/ripple/src/use-ripple' or its corresponding type declarations.

1 import * as _nextui_org_ripple_src_use_ripple from '@nextui-org/ripple/src/use-ripple';
                                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@nextui-org/card/dist/use-card.d.ts:1:52 - error TS2307: Cannot find module '@nextui-org/ripple/src/use-ripple' or its corresponding type declarations.

1 import * as _nextui_org_ripple_src_use_ripple from '@nextui-org/ripple/src/use-ripple';
                                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@nextui-org/select/dist/hidden-select.d.ts:4:52 - error TS2307: Cannot find module '@nextui-org/use-aria-multiselect/src/use-multiselect-state' or its corresponding type declarations.

4 import { MultiSelectState, MultiSelectProps } from '@nextui-org/use-aria-multiselect/src/use-multiselect-state';
                                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@nextui-org/select/dist/use-select.d.ts:2:77 - error TS2307: Cannot find module '@nextui-org/use-aria-multiselect/src/use-multiselect-state' or its corresponding type declarations.

2 import * as _nextui_org_use_aria_multiselect_src_use_multiselect_state from '@nextui-org/use-aria-multiselect/src/use-multiselect-state';

⛳️ Current behavior (updates)

Running tsc gives the above errors.

🚀 New behavior

Errors are fixed. No impact on runtime.

💣 Is this a breaking change (Yes/No):

No

📝 Additional Information

@vercel
Copy link

vercel bot commented Sep 10, 2023

@harryzcy is attempting to deploy a commit to the NextUI Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Sep 10, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextui-storybook-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 10, 2023 5:44am

@changeset-bot
Copy link

changeset-bot bot commented Sep 10, 2023

⚠️ No Changeset found

Latest commit: 92fd22a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Member

@jrgarciadev jrgarciadev left a comment

Choose a reason for hiding this comment

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

Thanks @harryzcy

@jrgarciadev
Copy link
Member

Btw @harryzcy make sure to not validate the libs typescript in your project:

// tsconfig.json

   "skipLibCheck": true,

@harryzcy
Copy link
Contributor Author

Btw @harryzcy make sure to not validate the libs typescript in your project:

// tsconfig.json

   "skipLibCheck": true,

@jrgarciadev Thanks, that helps.

@jrgarciadev jrgarciadev merged commit 8363a3e into nextui-org:main Sep 10, 2023
6 checks passed
@harryzcy harryzcy deleted the fix-import-error branch September 11, 2023 08:21
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.

3 participants