Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #1584
Closed
Open
Issue created Feb 17, 2017 by Administrator@rootContributor

PORT env variable not always an integer

Created by: 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): react-scripts@0.9.0
  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

Assignee
Assign to
Time tracking