Skip to content

Next.js 16: TypeError: Cannot create property 'webpack' on string 'phase-production-build' #1651

@vanruch

Description

@vanruch

What's happening?

In [email protected], [email protected], build fails with

> Build error occurred
TypeError: Cannot create property 'webpack' on string 'phase-production-build'
    at ignore-listed frames

Next config:

import type { NextConfig } from "next";
import path from "path";
import lingoCompiler from "lingo.dev/compiler";

const nextConfig: NextConfig = {
  reactStrictMode: true,
  typedRoutes: true,
  images: {
    dangerouslyAllowSVG: true,
    remotePatterns: [
      {
        hostname: "**",
      },
    ],
  },
  turbopack: {
    root: path.join(__dirname, "../.."),
  },
};

export default lingoCompiler.next({
  ...(nextConfig as object), // TS complains about turbopack type
  sourceLocale: "en",
  targetLocales: ["de"],
  models: "lingo.dev",
});

Exact Reproduction Steps

  1. Use lingo with next 16
  2. Run next build

Expected

Build should work

Actual

Screenshots/Videos

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions