capri-js / capri

Build static sites with interactive islands
https://capri.build
MIT License
200 stars 5 forks source link

🐛 BUG: Creating a new Capri with SolidJS #35

Closed davycoe closed 2 years ago

davycoe commented 2 years ago

Bug:

First issue seems to expect vite.config.js as vite.config.ts.js is generated.

failed to load config from /home/user/code/broken/vite.config.ts
error when starting dev server:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/user/code/broken/node_modules/@capri-js/solid/lib/index.js' imported from /home/user/code/broken/vite.config.ts.js

Then the node_modules path seems incorrect as it's targeting lib but contains /home/user/code/broken/node_modules/@capri-js/solid/src?

failed to load config from /home/user/code/broken/vite.config.js
error when starting dev server:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/user/code/broken/node_modules/@capri-js/solid/lib/index.js' imported from /home/user/code/broken/vite.config.js

I assume there has been a missing compile step as /home/user/code/broken/node_modules/@capri-js/solid/src contains typescript and or incorrect paths? as I can see /home/user/code/broken/node_modules/capri contains a lib folder containing both typescript and JavaScript.

fgnass commented 2 years ago

Thanks for reporting this! The error was caused by a missing "files" field in package.json and is now fixed in @capri-js/solid@4.0.2.

As for vite.config.ts.js: This file somehow gets created when there is an error while processing the Vite config. I have no idea why. Make sure to delete it, once you updated the capri package.

davycoe commented 2 years ago

Super fast, thanks! ⚡⚡⚡