Skip to content

NODE_ENV not being picked #174

@ineshbose

Description

@ineshbose

Environment

Node v20/v22 LTS
Windows 10
pnpm v10

Reproduction

import { defineNuxtConfig } from 'nuxt/config';
import { isDevelopment, nodeENV } from 'std-env';

console.log(process.env.NODE_ENV, { isDevelopment, nodeENV });

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  compatibilityDate: '2025-08-15',
  devtools: { enabled: true },
});

Running pnpm dev

Describe the bug

Likely not a bug with the package, but I'm trying to investigate.

nodeENV returns an empty string, and isDevelopment is false, despite process.env.NODE_ENV being development. Could you possibly give me pointers on what may be causing my environment to have this? I am happy to investigate myself and report back + close issue.

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions