Skip to content

[NEXT-1032] A Node.js API is used (process.turbopack at line: 47) which is not supported in the Edge Runtime. #48302

@TrevorThomp

Description

@TrevorThomp

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

    Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:43 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T8112
    Binaries:
      Node: 19.7.0
      npm: 9.5.0
      Yarn: 3.5.0
      pnpm: N/A
    Relevant packages:
      next: 13.3.0
      eslint-config-next: N/A
      react: 18.2.0
      react-dom: 18.2.0

Which area(s) of Next.js are affected? (leave empty if unsure)

Middleware / Edge (API routes, runtime)

Link to the code that reproduces this issue

https://github.com/TrevorThomp/nextjs-auth-repro

To Reproduce

# Make sure you are on latest Yarn version (>2.0.0).
yarn set version stable

# Install dependencies specified in package.json
yarn install

# Build the application
yarn build

# Build Docker container
yarn docker:build

Describe the Bug

When building the Next application through next build the following output occurs and will fail my builds in GCP:
Error

I raised this issue with Nextjs-Auth0 and they directed me back to here
auth0/nextjs-auth0#1152

The changes that started throwing this error was in the 13.3.0 release:
#47715
d71cbe9#diff-88cc5222d0ce7e563716eee434a1045d101b0043afd2450d66c9eb1ca4ac5cbb

Expected Behavior

Middleware with auth works as expected.

Which browser are you using? (if relevant)

N/A

How are you deploying your application? (if relevant)

N/A

NEXT-1032

Metadata

Metadata

Assignees

No one assigned

    Labels

    RuntimeRelated to Node.js or Edge Runtime with Next.js.TurbopackRelated to Turbopack with Next.js.bugIssue was opened via the bug report template.locked

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions