ciscoheat / sveltekit-flash-message

Send temporary data after redirect, usually from endpoints. Works with both SSR and client.
https://www.npmjs.com/package/sveltekit-flash-message
MIT License
246 stars 5 forks source link

Error when using vitest 0.34.1 - Failed to resolve entry for package "sveltekit-flash-message". #21

Closed benquan closed 11 months ago

benquan commented 11 months ago

When upgrading vitest from 0.33.0 to 0.34.1 I get the following error when running vitest:

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Rejection ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Error: Failed to resolve entry for package "sveltekit-flash-message". The package may have incorrect main/module/exports specified in its package.json: Missing "." specifier in "sveltekit-flash-message" package

If I remove sveltekit-flash-message from the project, vitest runs just fine.

Also if I leave the sveltekit-flash-message and go back to 0.33.0, vitest runs fine.

You could argue its a vitest problem, but the message is specific for sveltekit-flash-message and removing it solves the problem.

ciscoheat commented 11 months ago

I've opened an issue for this at vitest: https://github.com/vitest-dev/vitest/issues/3913

ciscoheat commented 11 months ago

Should be fixed now in 2.1.1, can you confirm that it is?

benquan commented 11 months ago

Yeap problem solved!