Skip to content
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

"Multiple copies of Liveblocks are being loaded in your project" in v1.2.4 with Next.js and Yarn PnP #1109

Open
a-churchill opened this issue Sep 2, 2023 · 0 comments
Labels
bug Something isn't working triage needed The issue needs to be reviewed by the team

Comments

@a-churchill
Copy link

Describe the bug

I installed @liveblocks/react and @liveblocks/client in my React application using Next.js and Yarn PnP, and now SSR fails for routes using the RoomProvider with the error message:

Error: Multiple copies of Liveblocks are being loaded in your project. This will cause issues! See https://liveblocks.io/docs/errors/dupes 

Conflicts:
- @liveblocks/core 1.2.4 (cjs) (already loaded)
- @liveblocks/core 1.2.4 (esm) (trying to load this now)

I already checked out the linked page and confirmed that I only have v1.2.4 in my yarn.lock file.

When I downgraded to v1.2.3, the error went away.

To Reproduce

  1. Create a Next.js app with a SSR route (using getServerSideProps), using Yarn PnP as a package manager
  2. Mount a RoomProvider at that route

Expected behavior

The SSR works and I can load the route

Environment (please complete the following information):

  • next: 12.1.5
  • yarn: 3.3.31
  • @liveblocks/client: 1.2.4
  • @liveblocks/react: 1.2.4
  • Browser: N/A
@a-churchill a-churchill added bug Something isn't working triage needed The issue needs to be reviewed by the team labels Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage needed The issue needs to be reviewed by the team
Projects
None yet
Development

No branches or pull requests

1 participant