Closed slackerzz closed 1 year ago
I feel like this is a new bug that was already attempted to be fixed in #3618, does that PR work for you? the situation is complicated as Webpack will try to import both the react 17 and react 18 import if it's a literal import, while pnpm removes the package if not in a literal import
Thank you @Haroenv , adding a pnpm patch with the changes from #3618 fixes the problem
Thanks for confirming, we'll look more into it
Thank you @Haroenv , adding a pnpm patch with the changes from #3618 fixes the problem
Sadly, it doesn't work for me. Although I don't get Error: Could not import ReactDOMServer.
anymore, page seems to load endlessly and throws 504 time-out. Locally no issues.
My environment:
Any upcoming fixes @Haroenv?
Are you also using pnpm @whitebackdoor ? if so you can use the patch
I'm using pnpm but patch doesn't fix the issue for me.
Please open a new issue with reproduction in that case, I guess it might not be the same issue @whitebackdoor
π Bug description
I'm using react-instantsearch-hooks-server with Next.js (vercel/commerce) and I have this error only in production (Vercel), in local dev environment it works as expected. The error started to appear with React 18, with 17 it worked.
π Bug reproduction
I tried to reproduce the bug in a codesandbox but it doesn't happen. I've setup a repo with an example at https://github.com/slackerzz/vercel-commerce It is a clean vercel/commerce with a route
/algolia
where i use the ssr provider. The code is availabel at https://github.com/slackerzz/vercel-commerce/blob/main/site/pages/algolia.tsx The index used is from https://codesandbox.io/s/github/algolia/react-instantsearch/tree/master/examples/hooks-nextIn a local environment running
pnpm dev
the/algolia
route works as expected:After deploying the app to Vercel the same route returns a 500 error
Environment
Additional context