Open danigb opened 1 year ago
Thank you for reporting in @danigb, I'll look into it as soon as possible.
I take it this is reproducible by creating a new Next project and simply using the app directory?
Did you try setting the environment value __NEXT_PRIVATE_PREBUNDLED_REACT=next
as mentioned here https://github.com/vercel/next.js/issues/49169#issuecomment-1562599903?
I'll take the heart as the issue is indeed solved by the environment variable. Looks like Next requires features not necessary available in React with this error showing up in various scenarios, custom servers being one of them. It works to set this env variable in the module code. I'll need to do some research/testing if this causes side-effects.
For now the recommendation is to set __NEXT_PRIVATE_PREBUNDLED_REACT=next
in the your app environment through .env
file or similar.
👍 Indeed, this works perfectly. Thanks a lot @TobiasMelen
I'll actually re-open this, this should ideally be fixed from next-dev-https, and keeping the issue open makes the temporary fix easier to find by others.
Thanks a lot for this package! ⭐ Simplifies a lot the some dev work 🙌
While I use this package without problem in some projects, when using
"next": "13.4.4"
with new app router I get this error: