-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unclear documentation around precompute #73
Comments
I'm do think my issue is more related to dynamicIO than it is to flags, but not 100% sure. |
I tried looking into this, but I'm not sure how to reproduce the problem you are seeing. Can you describe the steps? Here is what I did
This is a different error than you described. It's interesting as there is no |
@dferber90 , it looks like you get that error when the layout.tsx is in the level above "/[code]", if you have layout in code folder you do get the error I mentioned: https://github.com/mastoj/flags-experiment/tree/missing-code (created specific branch for it) After moving things around and adding the "use cache" directive to all places I think it needs to be added I still get an error, but now it is USE_CACHE_TIMEOUT: https://github.com/mastoj/flags-experiment/tree/cache-timeout You should be able to pull down the branches and do install then pnpm run build. This is not critical since it seems to be working fine if you don't use dynamicIO and this is most likely an issue with that... at the same time, it is always nice if one could end up in the pit of success also for things that are coming. |
I started experimenting with flags for real in preparation migrating our production site to it instead of using our own solution. I did find some issues around precompute.
I'm testing with canary since I also want to run with dynamicIO, so it might be that is what causing the issue.
The code for the sample is here: https://github.com/mastoj/flags-experiment
I have a very simple middleware where I calculate the code: https://github.com/mastoj/flags-experiment/blob/3f3569987306ce6c2f7ddf31441a35820ae2bf10/middleware.ts#L15-L20
and a very simple page: https://github.com/mastoj/flags-experiment/blob/main/app/%5Bcode%5D/%5Bslug%5D/page.tsx
The issue I get when building is:
I actually thought that I could use
but for some reason { code: } is required... but that would also mean creating something static. I do want it SSR and cached, but not during build time.
Is I doing something wrong with flags or have I misunderstood something with dynamicIO?
To reproduce you should be able to pull down the code and the:
The text was updated successfully, but these errors were encountered: