openv0 icon indicating copy to clipboard operation
openv0 copied to clipboard

Blank screen after openv0 attempts to generate a component

Open aws-avocado opened this issue 1 year ago • 3 comments

I'm ending up with a blank white screen after openv0 generates a component. It was working fine previously, and the only way to fix this is to run npx openv0 again to reinstall the app.

aws-avocado avatar Sep 21 '23 06:09 aws-avocado

I've had this issue as well, some generations are just not compatible (I guess?) and end up turning into a blank screen.

deleteman avatar Sep 21 '23 11:09 deleteman

Hi @aws-avocado and @deleteman,

I've encountered a situation like this before. In some cases, code generations don't export a default or import a library that's not available on the front end. As a result, when the app attempts to load these modules, it crashes. This issue arises because the project assumes that generated modules will always return a default export, or it may involve missing installed dependencies. One way to address this is by removing the problematic components from both the server and client sides.

@raidendotai, to improve this situation, adjusting prompts or validating would be nice to ensure that modules are correctly formatted before being written to the database.

related to #4 .

denyncrawford avatar Sep 24 '23 19:09 denyncrawford

@aws-avocado, @deleteman As a workaround consider using strict prompts, like: generate a button with a hellow world text inside, make sure to export a default

denyncrawford avatar Sep 24 '23 20:09 denyncrawford