Next.js Discord

Discord Forum

what can cause `web build: Error [ERR_REQUIRE_ESM]: require() of ES Module /vercel/path1/` error

Unanswered
Chinese softshell turtle posted this in #help-forum
Open in Discord
Chinese softshell turtleOP
as in image

3 Replies

Chinese softshell turtleOP
const { withNextJSRouteTypes } = require("nextjs-route-types")
const { paraglide } = require("@inlang/paraglide-next/plugin")

/** @type {import('next').NextConfig} */
const nextConfig = {
    reactStrictMode: true,
    typescript: {
        ignoreBuildErrors: true
    },
    eslint: {
        ignoreDuringBuilds: true
    },
    images: {
        remotePatterns: [{ protocol: "https", hostname: "**" }]
    },
    experimental: {
        serverActions: {
            bodySizeLimit: "5mb"
        }
    },
    clerk: {
        publicRoutes: ["/", "/:lang", "/:lang/sign-in", "/:lang/sign-up"]
    }
}

module.exports = paraglide({
    paraglide: {
        outdir: "./paraglide",
        project: "./project.inlang"
    },
    ...nextConfig
})
our next.config.js
it started happening randomly on new builds for us