Skip to content

Not working with Next.js 16 and turborepo #263

Description

@tuke307

Problem

The build pack turborepo is the standard for Next.js 16 now. When executing next dev it uses turborepo automatically.

use the Next js integration example and update to the newest packages with e.g. ncu -u or by manually updating.

with standard (turborepo):

~/source/project % npx next dev
   ▲ Next.js 16.0.1 (Turbopack)
   - Local:        http://localhost:3000
   - Network:      http://xxx:3000
   - Environments: .env

 ✓ Starting...
Error: loader /.../node_modules/@next/mdx/mdx-js-loader.js for match "{*,next-mdx-rule}" does not have serializable options. Ensure that options passed are plain JavaScript objects and values.
    at ignore-listed frames

Workaround

As a workaround, use webpack for building.
with webpack:

~/source/project % npx next dev --webpack
   ▲ Next.js 16.0.1 (webpack)
   - Local:        http://localhost:3000
   - Network:      http://xxx:3000
   - Environments: .env

 ✓ Starting...
 ✓ Ready in 1291ms

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