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

Warning after updating svelte & vite #4

Closed
EvEggelen opened this issue May 5, 2024 · 5 comments
Closed

Warning after updating svelte & vite #4

EvEggelen opened this issue May 5, 2024 · 5 comments

Comments

@EvEggelen
Copy link

EvEggelen commented May 5, 2024

10:19:02 AM [vite-plugin-svelte] WARNING: The following packages have a svelte field in their package.json but no exports condition for svelte.

trap-focus-svelte@1.0.2

Please see https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/faq.md#missing-exports-condition for details.

frompackage.json:
"trap-focus-svelte": "^1.0.2",
"svelte": "^4.2.15"
"vite": "^5.2.11"

@henrygd
Copy link
Owner

henrygd commented May 5, 2024

Hi, good timing on this actually.

I'm releasing a new version soon that hopefully fixes a couple edge cases and gets the size down to around 360 bytes gzip.

Can you try installing trap-focus-svelte@next to see if that fixes the warning? And also test your implementation again to make sure it's working properly?

Thank you very much.

@EvEggelen
Copy link
Author

EvEggelen commented May 6, 2024

I added : "trap-focus-svelte": "^1.1.0-rc2" in the package.json from Visual Code (npm i trap-focus-svelte@1.1.0-rc2). Is that what you mean by trap-focus-svelte@next.

Previously I was using : svelte-focus-trap v1.2.0. So I have to make some minor modifications ( change the name at some places).

So far it seems to work. However now I get the following warning in the editor:

import { trapFocus } from 'trap-focus-svelte';

Could not find a declaration file for module 'trap-focus-svelte'. '/home/xxxx//Documents/PlatformIO/Projects/espidf_sveltekit/interface/node_modules/trap-focus-svelte/dist/trap-focus-svelte.svelte.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/trap-focus-svelte` if it exists or add a new declaration (.d.ts) file containing `declare module 'trap-foc

@henrygd
Copy link
Owner

henrygd commented May 6, 2024

Okay thanks, should work now with 1.1.0-rc3

There's no 1.2.0 so I think you were on 1.0.2 as per your package.json posted above.

I just meant install the @next version with pnpm install trap-focus-svelte@next which should be pegged to the latest release candidate.

If you can update to 1.1.0-rc3 and verify that it's working properly, I'll go ahead and release it as 1.1.0. Thanks!

@EvEggelen
Copy link
Author

I just tested 1.1.0-rc3. My warnings are now gone. Thanks !

@henrygd
Copy link
Owner

henrygd commented May 10, 2024

Awesome!

I released 1.1.0. It's the same as the @next version so you can update to that if you want.

@henrygd henrygd closed this as completed May 10, 2024
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

2 participants