I am trying to deploy my project using Surge and a custom domain. Here are the steps I followed:
-
Deployed the project using a custom domain: surge ./project-folder your-custom-domain.surge.sh
-
Created a CNAME file with the custom domain:echo your-custom-domain.surge.sh > CNAME
-
Verified the CNAME file content:your-custom-domain.surge.sh
-
Attempted to update the project using the CNAME file:surge .
However, I am getting the following error:
node:url:416
throw new ERR_INVALID_URL(url);
^
TypeError [ERR_INVALID_URL]: Invalid URL
…
How can I resolve this error and ensure that I can update my project using the CNAME file without specifying the URL each time?
What I’ve Tried:
Verified the content of the CNAME file.
Ensured there are no hidden characters or extra spaces in the CNAME file.
Confirmed that the custom domain is correctly configured.
Any help would be greatly appreciated!
Deepanshu Dixit is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.