Hi. I use the api in nuxt. I make a request through composable useFetch, but I get an error when starting the application. FetchError: [GET] "https://api.themoviedb.org/3/movie/popular?language=en": fetch failed cause: TypeError: fetch failed cause: Error: connect ECONNREFUSED 127.0.0.1:443 I tried to make a request with jsonplaceholder and everything works correctly. What could be the problem? Thanks for the answer.
找不到电影或节目?登录并创建它吧。
Travis Bell 的回复
于 2024 年 03 月 14 日 11:11上午
Hi @vlsv,
Something in your environment is returning a localhost address (
127.0.0.1
) as the IP address forapi.themoviedb.org
.You could try changing nameservers wherever this environment is to either:
And see if the problem corrects itself. FYI: we have seen Cloudflare not always return the correct addresses so Google or Quad9 are your best bets.
vlsv 的回复
于 2024 年 03 月 14 日 6:04下午
Unfortunately, these didn't help. There is no such problem when between page navigations, only when starting the app...