aidenybai / million

Optimize React performance and make your React 70% faster in minutes, not months.
https://million.dev
MIT License
16.19k stars 567 forks source link

🛠️ Tooling: Allow local website development without a Liveblocks key? #867

Closed JoshuaKGoldberg closed 3 months ago

JoshuaKGoldberg commented 8 months ago

Right now, if you don't set a NEXT_PUBLIC_LIVEBLOCKS_PUBLIC_KEY environment key and then pnpm dev the website, the page throws an error in the terminal:

 ✓ Compiled / in 6s (3741 modules)
 ⨯ Error: Invalid Liveblocks client options. Please provide either a `publicApiKey` or `authEndpoint` option. They cannot both be empty. For more information: https://liveblocks.io/docs/api-reference/liveblocks-client#createClient
    at prepareAuthentication (file:///Users/josh/repos/million/node_modules/.pnpm/@liveblocks+core@1.5.0/node_modules/@liveblocks/core/dist/index.mjs:1449:9)
    at createAuthManager (file:///Users/josh/repos/million/node_modules/.pnpm/@liveblocks+core@1.5.0/node_modules/@liveblocks/core/dist/index.mjs:1298:26)
    at createClient (file:///Users/josh/repos/million/node_modules/.pnpm/@liveblocks+core@1.5.0/node_modules/@liveblocks/core/dist/index.mjs:6001:23)
    at eval (webpack-internal:///./liveblocks.config.ts:15:80) {
  page: '/'
}

...which gets shown as a blocking Next.js error modal:

Screenshot of a Next.js error modal showing the 'Invalid Liveblocks client options' error from the code block. Its source code block shows liveblocks.config.ts (5:28), from a call to a createClient function.

It'd be nice if we didn't need to have a Liveblocks account to run the website locally. Would you be open to letting the website run without one in dev mode? I'd be happy to send a PR that refactors this a bit to just log a warning! ❤️

github-actions[bot] commented 8 months ago

Thanks for opening this issue! A maintainer will review it soon.

skushagra9 commented 7 months ago

Hey, I was working on this, I logged a warning for the absence of the env variable @tobySolutions , are you open to run the website like this in dev mode??

github-actions[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days.

JoshuaKGoldberg commented 6 months ago

🤔 this feels like an unnecessarily aggressive stale bot. It probably shouldn't close issues that aren't waiting on an external person, no?

github-actions[bot] commented 6 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days.

JoshuaKGoldberg commented 6 months ago

bamp

github-actions[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days.

JoshuaKGoldberg commented 5 months ago

bibbity

github-actions[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days.

JoshuaKGoldberg commented 5 months ago

bobbity

github-actions[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days.

JoshuaKGoldberg commented 4 months ago

boomp

github-actions[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days.

JoshuaKGoldberg commented 4 months ago

bidoof

ImLunaHey commented 3 months ago

can someone change the stale bot my god..

aidenybai commented 3 months ago

Liveblocks GONE