Cannot find module cookie when deploying on vercel
MaciejWiatr opened this issue ยท 5 comments
The code im having issue with is: https://github.com/MaciejWiatr/Nextagram/tree/develop
However, I now see that this disables automatic static optimization and make the whole bundle a lot bigger D:
Thanks for reporting this and sorry for ghosting! I don't know what's going on with vercel there; do they build a server-side bundle? I certainly introduced this problem in d9e0315 as a reaction to #8, not meaning to affect server-side behavior.
However, I now see that this disables automatic static optimization and make the whole bundle a lot bigger D:
Two different things here:
- Automatic static optimization is always disabled when
next-redux-cookie-wrapper
is in place, since it still uses the old v5 ofnext-redux-wrapper
. #9 is related to that. Hope to build something neat in the next semester break. - Bundle size: That's why I tricked Next.js into excluding the server-only
cookies
library from the bundle using the "eval cheat". It now seems that vercel walks into the same trap. I will need to look for a better solution here, didn't work with vercel yet...
๐ This issue has been resolved in version 1.1.4 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐
I discovered the browser
field in package.json
to exclude the cookies
library from the client build (and only the client build, hopefully ๐). @MaciejWiatr Please try again and feel free to re-open the issue if the new version does not fix the problem!