Skip to content

npm run start should handle the port being in use #658

@maribethb

Description

@maribethb

Category

Scripts

Component

blockly-scripts start

Describe the bug

npm run start is configured to use port 3000 to run a plugin test page. If you already have another plugin open, or any other process listening on that port, the script silently fails. The symptom is no meaningful error message but Chrome does not launch as expected.

To Reproduce

npm run start on a plugin, leave it open
npm run start in another tab
Chrome does not open for the second one, no error

Expected behavior

Preferred: The script chooses an available port dynamically
Acceptable: An error message saying the port is in use.

Additional context

If you think this is happening to you (ie Chrome won't open and you don't know why), you can try
lsof -i :3000
If there is any output with a pid, that means there is a process using port 3000 already, and start script will fail.
kill 12345 where 12345 = the pid from the command above. This should kill the process and free up the port.

Metadata

Metadata

Assignees

No one assigned

    Labels

    category: pluginAnything in the plugins foldertype: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions