Closed Olyno closed 2 years ago
Thanks for finding this! The bundling/packaging is still a little weird with the beta version, I intend to resolve all that before the final release.
Can you let me know which bundler or tool gave you this message? Or better yet a small example to reproduce it? With that I should be able to resolve the issue. Thanks!
I'm using a Svelte kit project. I guess for the reproduction, installing the module is enough (it's how it happened in my case). Svelte kit is based on Vite, so it wouldn't surprise me if there is the same warning with Vite
I was able to reproduce this with a skeleton SvelteKit project, thanks!
Really odd... I got this error when I first created the SvelteKit project. After that I fixed it, but when I reverted my changes I didn't see the error anymore. Even creating a new project from scratch no longer showed the error. Not sure why!
At any rate, I added "type": "module"
to the package.json
for all three packages.
Can you try the new beta version (run npm install picmo@beta
) - should be 5.0.0-beta.10
, let me know if the issue goes away for you now? It should be gone since it is now properly flagged as an ES module.
I'll leave the issue open; if the new version fixes this for you, feel free to close. Thanks!
PS: I also was able to discover another issue by trying it in SvelteKit. The main PicMo module had some side effects; that is, it was calling some functions on window
and document
as soon as the library was imported. This was causing errors since SvelteKit is rendering on the server.
That should be all set now, you will need to wrap the createPicker
call in the browser
check but the import itself should no longer cause issues.
It looks like i don't have the warning anymore, thank you!
Hi 👋🏻 It looks like Picmo packages are not conventional:
(i got the same warning with other packages from Picmo's project)
Would it be to fix it please?