You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lanUrlForConfig is set to undefined if the ip address is not private. This results in the error Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.allowedHosts[0] should be a non-empty string. I was having a Hamachi server https://www.vpn.net/ open in the background, and it took a long time to figure out that the ip address fetched was the ip address of the hamachi server (starting with 25, i.e. not private).
Describe the solution you'd like
If the error should indeed happen in this case I would like the logging to be improved. Maybe tell the user that the ip is not private, and is what causes the error.
Is your proposal related to a problem?
When fetching the ip address here
create-react-app/packages/react-dev-utils/WebpackDevServerUtils.js
Lines 46 to 60 in a422bf2
lanUrlForConfig
is set toundefined
if the ip address is not private. This results in the errorInvalid options object. Dev Server has been initialized using an options object that does not match the API schema. - options.allowedHosts[0] should be a non-empty string.
I was having a Hamachi server https://www.vpn.net/ open in the background, and it took a long time to figure out that the ip address fetched was the ip address of the hamachi server (starting with 25, i.e. not private).Describe the solution you'd like
If the error should indeed happen in this case I would like the logging to be improved. Maybe tell the user that the ip is not private, and is what causes the error.
Describe alternatives you've considered
In the start when I encountered the error, I worked around it using the solution stated in https://stackoverflow.com/questions/70374005/invalid-options-object-dev-server-has-been-initialized-using-an-options-object/70491173#70491173 which indeed worked. This was just a bandaid solution however.
Additional context
This is related to #11762 and #11877
The text was updated successfully, but these errors were encountered: