[I am getting invalid url error in an appwrite and react + vite website
I have tried console.log(conf.appwriteUrl)
to check if url and ProjectID is passing on correctly(they are) and there are no typo in the url and project id
]
here is an image of my code :
Error says "Failed to construct ‘URL’: Invalid URL"
and here is an image of an error:
2
Answers
What URL are you using? It is the best to copy paste the server endpoint from the project settings page.
The Appwrite SDK accepts a
string
type as the parameter in theclient.setEndpoint
function, not theURL
type. An example of this is:Can you check if your type is set correctly in the
conf.js
file? This might be causing an error cirumstantially.Additionally, it would help to recheck if the right endpoint has been copied from the Appwrite Console as well.