Skip to content

Configuration.port should be a number #761

@ghost

Description

When initialising webpack-dev-server 2.2.0 I get the following error:

Invalid configuration object. webpack-dev-server has been initialised using a configuration object that does not match the API schema.
 - configuration.port should be a number.
error Command failed with exit code 1.

I'm reading the port from an environment variable (with the contents 8080). Using port: parseInt(process.env.DEV_PORT) (here) solves the problem, but I was just wondering if this is meant to work like this, as I have no way to influence whether the environment variable reads as a string or a number, other than using parseInt.

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