Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

new get-port version breaks when using ENV var to set port #164

Closed
pixeldrew opened this issue Oct 15, 2024 · 2 comments · Fixed by #165
Closed

new get-port version breaks when using ENV var to set port #164

pixeldrew opened this issue Oct 15, 2024 · 2 comments · Fixed by #165

Comments

@pixeldrew
Copy link
Contributor

pixeldrew commented Oct 15, 2024

When setting env var PORT="8080"

New version of get-port expects an integer as an argument and returns an integer instead of a string. So when opts.port is set as an env var the value, it does not get converted to an integer and get-port gives you a different random port.

The way to correct this would be to convert the process.env PORT value to integer before sending it to get-port

@pixeldrew
Copy link
Contributor Author

This has broken our build since we didn't pin the sirv-cli version.

@pixeldrew pixeldrew changed the title new get-port version breaks new get-port version breaks when using ENV var Oct 15, 2024
@pixeldrew pixeldrew changed the title new get-port version breaks when using ENV var new get-port version breaks when using ENV var to set port Oct 15, 2024
@pixeldrew
Copy link
Contributor Author

@lukeed any chance you can take a look at this?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant