plotly / dash-component-boilerplate

Get started creating your own Dash components here.
265 stars 182 forks source link

add option to change port for MacOs #141

Closed MartinHanewald closed 2 years ago

MartinHanewald commented 2 years ago

On MacOS since Big Sur the default port 55555 is already in use. Therefore npm run start will fail, with the message:

Error: listen EADDRINUSE: address already in use :::55555

This PR adds the option to change the port in webpack.config.js

MartinHanewald commented 2 years ago

Refer to this discussion: https://github.com/shellscape/webpack-plugin-serve/issues/222

MartinHanewald commented 2 years ago

Another option would be to change the port 55555 altogether to something else. But I have no idea what implications that might have on other OSes.

alexcjohnson commented 2 years ago

Oh wow, good to know, and thanks for the PR @MartinHanewald! I wonder though, does it work to use the --port arg that webpack-serve already supports, per https://www.npmjs.com/package/webpack-serve ?

You could try eg npm run start -- --port=55556 - and if that works we should leave the code as is and just document this solution.

That said we've largely moved away from using the standalone demo app even during initial component development, to just developing the component inside a simple dash app, and running the regular webpack command inside a watcher... so longer-term we may be better off formalizing that in here as well.

MartinHanewald commented 2 years ago

Yes! Your proposed command line solution works :) So, better leave as is and document!