Skip to content

Starting or Building Keystone with NODE_ENV set production fails. #8774

Open
@chukwumaijem

Description

@chukwumaijem

Please add steps to reproduce the problem

  • Scaffold a new Keystonejs app.
  • Install dotenv or a similar tool
  • inside keysone.ts file, import dotenv import 'dotenv/config';
  • set NODE_ENV=production in .env file
  • Try building the project.

Please describe what you expected to happen

It should build successfully. It builds in development, testing, and staging. It builds even when NODE_ENV is undefined. But only fails in production mode.

Please add any screenshots if possible

image

Please add contextual information such as your node version (node -v), or the web browser you used

Tried on NODE v16, v18, and v20 (using nvm).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions