vercel/next.js · error

You are using a non-standard "NODE_ENV" value in your enviro

Error message

You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env

What it means

Error "You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env" thrown in vercel/next.js.

Source

Thrown at packages/next/src/server/next.ts:669

    const pluginMod: typeof import('./next-typescript') =
      require('./next-typescript') as typeof import('./next-typescript')
    return pluginMod.createTSPlugin(
      options as any
    ) as unknown as NextWrapperServer
  }

  if (options == null) {
    throw new Error(
      'The server has not been instantiated properly. https://nextjs.org/docs/messages/invalid-server-options'
    )
  }

  if (
    !('isNextDevCommand' in options) &&
    process.env.NODE_ENV &&
    !['production', 'development', 'test'].includes(process.env.NODE_ENV)
  ) {
    log.warn(NON_STANDARD_NODE_ENV)
  }

  if (options.dev && typeof options.dev !== 'boolean') {
    console.warn(
      "Warning: 'dev' is not a boolean which could introduce unexpected behavior. https://nextjs.org/docs/messages/invalid-server-options"
    )
  }

  // When the caller is a custom server (using next()).
  if (options.customServer !== false) {
    const dir = path.resolve(/* turbopackIgnore: true */ options.dir || '.')

    return new NextCustomServer({
      ...options,
      dir,
    })
  }

View on GitHub (pinned to 0eb3775416)

Solutions

  1. Use a standard NODE_ENV value: 'development', 'production', or 'test'.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/next/src/server/next.ts:669 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of vercel/next.js@0eb3775416 (2026-08-19). Data as JSON: /api/errors/3cfac6090647c602. Report an issue: GitHub.