Skip to content

Projects with a port in .ember-cli that is the default port use port finder when not wanted #10920

@BoussonKarel

Description

@BoussonKarel

We have multiple apps at our company.
The main one has port 4200, the second one 4201 and the third one 4202.

We have this port defined in .ember-cli

{
  ...
  "port": 4200,
  ...
}

We don't want any other port, we want the app to crash with "Port already in use".
This works for the apps on ports 4201, 4202... but not for the app with 4200.
Here it serves with the next available port, which is conflicting with our other app's port.

I've tracked it down to here: stopPort is not provided to PortFinder, because the port I specified is the same as the default Ember port, meaning it keeps searching for the next available port.

if (commandOptions.port !== 0 && commandOptions.port !== DEFAULT_PORT) {

Problem is that you have || DEFAULT_PORT defined here, but also as default in the available command options. So commandOptions.port is almost always defined (by default)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions