Skip to content

PORT env variable not always an integer #1584

Closed
@matoilic

Description

@matoilic

Description

When setting the PORT env variable it is a string, no matter if I set it like PORT="8088" or PORT=8088. This causes the port check in the start script if (port === DEFAULT_PORT) to always fail. port is an integer and DEFAULT_PORT a string. It also causes the kitchensink e2e test to hang.

Expected behavior

The server should start at the given port.

Actual behavior

The start script complains that something is already running on the given port.

Environment

Run these commands in the project folder and fill in their results:

  1. npm ls react-scripts (if you haven’t ejected): [email protected]
  2. node -v: v6.9.4
  3. npm -v: 3.10.10

Then, specify:

  1. Operating system: macOS 10.12.3
  2. Browser and version: is not a browser issue

Reproducible Demo

Try starting the development server with PORT=3002 npm start

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions