Skip to content

fix(nextjs): Move server-only resolution to runtime - #3761

Merged
LauraBeatris merged 2 commits into
mainfrom
move-server-only-error-to-runtime
Jul 18, 2024
Merged

fix(nextjs): Move server-only resolution to runtime#3761
LauraBeatris merged 2 commits into
mainfrom
move-server-only-error-to-runtime

Conversation

@LauraBeatris

Copy link
Copy Markdown
Contributor

Description

#3758 introduces an issue where server-only gets resolved when importing any module from @clerk/nextjs/server. An example of that is that the error gets thrown when using getAuth from getServerSideProps.

This PRs moves the server-only resolution to runtime within auth and currentUser.

Checklist

  • npm test runs as expected.
  • npm run build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@LauraBeatrisLauraBeatris self-assigned this Jul 18, 2024
@changeset-bot

changeset-botBot commented Jul 18, 2024

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6f71552

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
NameType
@clerk/nextjsPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@LauraBeatris
LauraBeatrisforce-pushed the move-server-only-error-to-runtime branch from 7507e56 to e149817CompareJuly 18, 2024 19:46
@LauraBeatris
LauraBeatris marked this pull request as ready for review July 18, 2024 19:58
@LauraBeatris
LauraBeatris requested review from a team and tmilewskiJuly 18, 2024 19:58
@LauraBeatrisLauraBeatris changed the title fix(nextjs) Move server-only resolution to runtime fix(nextjs): Move server-only resolution to runtime Jul 18, 2024
@LauraBeatrisLauraBeatris changed the title fix(nextjs): Move server-only resolution to runtime fix(nextjs): Move server-only resolution to runtimeJul 18, 2024
@LauraBeatris
LauraBeatris enabled auto-merge (squash) July 18, 2024 20:07
@LauraBeatris
LauraBeatris disabled auto-merge July 18, 2024 20:08
@LauraBeatris
LauraBeatrisforce-pushed the move-server-only-error-to-runtime branch from c62df84 to 6f71552CompareJuly 18, 2024 20:12
@LauraBeatris
LauraBeatris enabled auto-merge (squash) July 18, 2024 20:18
@LauraBeatris
LauraBeatris merged commit b8e3129 into mainJul 18, 2024
@LauraBeatris
LauraBeatris deleted the move-server-only-error-to-runtime branch July 18, 2024 20:22
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@LauraBeatris@tmilewski@clerk-cookie