Skip to content

fix(nextjs): Import helper from subpath to avoid static analysis warnings - #4462

Merged
nikosdouvlis merged 10 commits into
mainfrom
nikos/fix-shared-warning
Nov 2, 2024
Merged

fix(nextjs): Import helper from subpath to avoid static analysis warnings#4462
nikosdouvlis merged 10 commits into
mainfrom
nikos/fix-shared-warning

Conversation

@nikosdouvlis

Copy link
Copy Markdown
Member

Description

We need to import from the shared subpath, otherwise next prod builds will report the following issue:

Learn more: https://nextjs.org/docs/api-reference/edge-runtime

Import trace for requested module:
./node_modules/@clerk/shared/dist/chunk-RSOCGYTF.mjs ./node_modules/@clerk/shared/dist/index.mjs

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:

…ings

Otherwise, next prod builds will report the following issue:

A Node.js API is used (MessageEvent at line: 28) which is not supported in the Edge Runtime.
Learn more: https://nextjs.org/docs/api-reference/edge-runtime

Import trace for requested module:
./node_modules/@clerk/shared/dist/chunk-RSOCGYTF.mjs
./node_modules/@clerk/shared/dist/index.mjs
@changeset-bot

changeset-bot Bot commented Nov 2, 2024

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 638966e

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

This PR includes changesets to release 16 packages
Name Type
@clerk/nextjs Patch
@clerk/astro Patch
@clerk/chrome-extension Patch
@clerk/clerk-js Patch
@clerk/shared Patch
@clerk/clerk-expo Patch
@clerk/backend Patch
@clerk/elements Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/clerk-react Patch
@clerk/remix Patch
@clerk/clerk-sdk-node Patch
@clerk/tanstack-start Patch
@clerk/testing Patch
@clerk/ui Patch

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

@brkalow brkalow left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏

@nikosdouvlis
nikosdouvlis force-pushed the nikos/fix-shared-warning branch from ee96d88 to c172741 Compare November 2, 2024 18:31
Comment thread packages/shared/src/index.ts Outdated
Co-authored-by: Jacek Radko <jacek@clerk.dev>
@nikosdouvlis
nikosdouvlis merged commit bfe4620 into main Nov 2, 2024
@nikosdouvlis
nikosdouvlis deleted the nikos/fix-shared-warning branch November 2, 2024 19:11
wobsoriano pushed a commit that referenced this pull request Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants