themesberg/flowbite-svelte

index.js missing from package.json

shridhardamle opened this issue · 18 comments

Describe the bug

"main": "index.js" line is missing from node_modules/flowbite-svelte/package.json

Reproduction

"main": "index.js" line is missing from node_modules/flowbite-svelte/package.json That breaks compiling the code. Moved back from latest 0.3x.x version to 0.29.x and it started compiling.

Flowbite version and System Info

flowbite-svelte 0.34.x 👎

flowbite-svelte 0.29.x 👍

If you don’t specify the “main” field, Node.js will just look for an “index.js” file in the root directory by default.
But I will put it back in the next version update.
Thanks.

Thanks for quick response @shinokada . Flowbite is very cool.

0.29.13 is the last version that works for me

Can you try the latest version and let me know.

I just pulled flowbite-svelte@latest and got

"flowbite": "^1.6.4",
"flowbite-svelte": "^0.34.9",

flowbite-svelte's package.json contains following line ..

"main": "dist/index.js",

I got following error while building ...

Failed to resolve entry for package "flowbite-svelte". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." entry in "flowbite-svelte" package
error during build:
Error: Failed to resolve entry for package "flowbite-svelte". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." entry in "flowbite-svelte" package

I had to make a few things to the package.json to make it work. Basically copied quite a bit from 29.x build.

Attached is the package.json that worked.

package.json.zip

0.34.9 doesn't work for me and I'm using the latest NodeJS 19. 0.29.13 works.

Before you build, you need to remove package-lock or pnpm-lock file and remove dist directory and try it again.

How do I build? Do you mean run npm install or something else? Or should I just wait for the next release?

The current recommended Node version is 18.
Please try it with Node 18 and let us know if you still have the problem.

Thank you for your contribution! We are closing this issue for now due to inactivity. If you encounter any other problems in the future, please feel free to open a new issue. We appreciate your help in making our project better!