Ajay-Dhangar / youtube_clone

My YouTube 📹
https://my-youtube-ajay.vercel.app/
4 stars 0 forks source link

Awesome Script, but I get a blank page after npm run build #3

Closed inglesuniversal closed 1 year ago

inglesuniversal commented 1 year ago

Am I missing an API key or something?

Thanks

Ajay-Dhangar commented 1 year ago

Hi,

Thank you for reporting this issue. Based on the error message you provided, it seems like there is an error related to the CORS (Cross-Origin Resource Sharing) policy when making API requests in your YouTube clone project.

CORS is a security feature implemented by web browsers to prevent cross-origin requests, i.e., requests made from a different domain than the one hosting the web page. To resolve this issue, you can try one or more of the following steps:

  1. Check the API endpoint URL and make sure it is correct.
  2. Verify that the server hosting the API allows cross-origin requests from your domain.
  3. Use appropriate CORS headers on the server-side to allow cross-origin requests.
  4. Ensure that your client-side code (e.g., JavaScript) is making the API request correctly with the correct headers and credentials.

If you are still facing the issue after trying the above steps, please provide more information about your setup, including the code you are using for making API requests, any error logs or messages, and the relevant parts of your project configuration. This will help us better understand the issue and provide more targeted assistance.

Let me know if you have any further questions or need additional help. We're here to support you!

Best, Ajay-Dhangar