This repository has been archived by the owner on Jan 11, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ascorbic, I thought about this one some more, and since this is the default if they have nothing configured, we can explicitly set it to"command": "vite --port 5173",
? That way anyone who was using it previously won't run into any issues and new folks won't run into issues either.If we were to use an environment variable, we'd have to use a vite config to consume it to set the port. The only problem with this is there's a disconnect between the command and the port fields, although this is a minor issue. We could also remove the--port 5173
at some point since most people will probably have updated at some point.Thoughts?I thought about this again and explicitly adding the port could be more problematic. I think just tearing the bandaid off and notifying folks in support as well as Discords about the port change might be a better way. And again, the CLI will mention to configure
targetPort
in your netlify.toml if it's waiting.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got this message with SvelteKit first changed and was not immediately aware that it couldn't find a port. It became clear eventually, but this message is stalled out. Is there a way to error out if it doesn't find one in a specific amount of time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @brittneypostma , erroring out after a specified amount of time would be useful so it removes the perception of 'hanging' and a useful error message can help the user troubleshoot a bit better with respect to the expected port for the framework
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think the timeout makes sense. Just wondering what makes sense in terms of time taking into account not everyone is running an M1. Maybe 30 seconds and make the message clearer? And if it fails to find it, we can add an error message like you suggested @ericapisani.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this is too aggressive, but I wonder if we would want to make the timeout a bit shorter (10-15 seconds) as I imagine that folks will ctrl/cmd+c the process sooner in the 30 second time frame π€ I'm not sure if we have any data to provide some guidance on this for us though so we can make a more informed decision
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think 10-15 seconds may be too aggressive given that not everyone is running an M1. I think if we do 30 and make the message clearer about the port we should be good alongside the port change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on @seldo's comments in Slack, i.e. "People are overwhelmingly on version 3", I think it's safe to flick the switch to port 5173 and folks on older versions will get the port warning the CLI provides.