Skip to content

@clerk/nextjs version 6.10.3 casue A Node.js API is used (process.cwd at line: 24) which is not supported in the Edge Runtime. in Edge Runtime #5025

@arvinxx

Description

@arvinxx

Preliminary Checks

Reproduction

https://github.com/lobehub/lobe-chat

Publishable key

none pk

Description

Steps to reproduce:

  1. git clone https://github.com/lobehub/lobe-chat
  2. pnpm i
  3. pnpm run build

Expected behavior:

build success without warning

Actual behavior:

it will show error log of A Node.js API is used (process.cwd at line: 24) which is not supported in the Edge Runtime.

Import trace for requested module:
./node_modules/@clerk/nextjs/dist/esm/server/keyless-node.js
./node_modules/@clerk/nextjs/dist/esm/server/createGetAuth.js
./node_modules/@clerk/nextjs/dist/esm/server/index.js
./node_modules/@clerk/nextjs/dist/esm/server/keyless-node.js
A Node.js API is used (process.cwd at line: 39) which is not supported in the Edge Runtime.
Learn more: https://nextjs.org/docs/api-reference/edge-runtime

Environment

System:
    OS: macOS 15.2
    CPU: (10) arm64 Apple M1 Max
    Memory: 73.48 MB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.11.0 - /usr/local/bin/node
    Yarn: 1.22.19 - ~/Library/pnpm/yarn
    npm: 9.2.0 - ~/Library/pnpm/npm
    pnpm: 9.15.4 - ~/Library/pnpm/pnpm
    bun: 1.0.26 - ~/Library/pnpm/bun
  Browsers:
    Brave Browser: 127.1.68.128
    Chrome: 132.0.6834.111
    Chrome Canary: 134.0.6983.0
    Safari: 18.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions