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

Missing Popover in melt/builders #10

Open
MalSZ opened this issue Dec 27, 2024 · 1 comment
Open

Missing Popover in melt/builders #10

MalSZ opened this issue Dec 27, 2024 · 1 comment

Comments

@MalSZ
Copy link

MalSZ commented Dec 27, 2024

Hi,

It looks like Popover for builders has some problems with export(info Module '"melt/builders"' has no exported member 'Popover'). It only happens to Popover components. The rest of the components work fine with import.

Melt version 0.2.1
NPM version 11.0.0
Node version 22.11.0 (the same also with 18.20.5)

Zrzut ekranu 2024-12-27 o 17 47 21

Also, there is info in node_modules > melt.

Zrzut ekranu 2024-12-27 o 17 53 14

From the node folder, it looks like a TS file for the Popover component is missing.

Zrzut ekranu 2024-12-27 o 17 56 45

UPDATE:

After some testing, I found that the problem was with the svelte-package. During the run, it does not create a d.ts file when it encounters some nested types that are not imported. In this case, the problem was in line 55 of the file Popover.svelte.ts in folder builders.

computePositionOptions?: MaybeGetter<Partial<ComputePositionConfig> | undefined>;

How do I get to this?

During regular runs, it does not show any problem during emit. Helpful was this topic @sveltejs/language-tools#2371 from https://github.com/sveltejs/language-tools

After running the script from @jeannemas in the console, I got:
Zrzut ekranu 2024-12-27 o 22 13 49

After adding one line of imports import type { Middleware } from "@floating-ui/core"; to Popover.svelte.ts command build:docs generate missing d.ts file.

Zrzut ekranu 2024-12-27 o 22 20 30 Zrzut ekranu 2024-12-27 o 22 21 56

I also tried with a bumped version of svelte-check to ^4 with combinations like vite ^6 and a few others, but I never received this same error as with this custom script.

MalSZ added a commit to MalSZ/next-gen that referenced this issue Dec 27, 2024
Adding import type from @floating-ui/core to eliminate the problem that blocks the generating of d.ts file for Popover.svelte.ts during the run of svelte-package
@MalSZ
Copy link
Author

MalSZ commented Dec 27, 2024

I just create pull request #12

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

No branches or pull requests

1 participant