Skip to content

Inconsistent environment #19039

@ShahriarKh

Description

@ShahriarKh

When I npm start without setting NODE_ENV, the application shows development both in welcome page and terminal, but prevents me from accessing Content-type Builder by showing an alert:

Note

Information:
Strapi is in production mode, editing content types is disabled. Please switch to development mode by starting your server with strapi develop.

This inconsistent behavior causes frustration.
The solution is to add NODE_ENV=production (in .env or script), but I think if strapi already knows the app in production mode (like in content-type builder), this should be reflected in other parts as well.

Required System information

  • Node.js version: 18.17.0 | 20.5.1
  • NPM version: 10.2.3 | 9.8.0
  • Strapi version: 4.15.5
  • Database: MySQL
  • Operating system: Windows 10 | Linux (CloudLinux)
  • Is your project Javascript or Typescript: Javascript

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions