Skip to content

Build script fails on Windows due to Unix-specific CI= syntax #165

Description

@k-o-c-o

Description

The current build script in each project's package.json uses Unix-style environment variable syntax:

"build": "CI= react-scripts build"

This works on Unix-based systems, but fails on Windows (PowerShell/Command Prompt).

Steps to Reproduce

  1. Clone the repository.
  2. Navigate to any project's final directory.
  3. Install dependencies:
npm install
  1. Run:
npm run build

Expected Behavior

The project should build successfully.

Actual Behavior

The following error is displayed on Windows:

'CI' is not recognized as an internal or external command,
operable program or batch file.

Environment

  • OS: Windows 11
  • Shell: PowerShell

Use a cross-platform approach for setting environment variables, such as cross-env, or update the build script so it works on Windows, macOS, and Linux.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions