gitdagray / next-js-course

431 stars 210 forks source link

next-js-course/next-05/app/[searchTerm] #3

Open HadeedTariq opened 1 year ago

HadeedTariq commented 1 year ago

my code is not working how ever i copy the same code but whenever I request to the api the data is not coming

webdevheet commented 1 year ago

Please share your error message!

MontyWilliams commented 1 year ago

Here is my error:

Failed to set fetch cache https://en.wikipedia.org/w/api.php?action=query&generator=search&gsrsearch=ok&gsrlimit=20&prop=pageimages%7Cextracts&exchars=100&exintro=true&explaintext=true&exlimit=max&format=json&origin= TypeError: cookies is not iterable at get [headers map sorted] (node:internal/deps/undici/undici:1844:34) at node:internal/deps/undici/undici:1865:43 at Headers Iterator.next (node:internal/deps/undici/undici:1108:26) at Function.fromEntries () at /home/monty/nextjstutorial2/next05/node_modules/next/dist/server/lib/patch-fetch.js:135:49 error - TypeError: cookies is not iterable error - TypeError: cookies is not iterable digest: "3550467805" Failed to set fetch cache https://en.wikipedia.org/w/api.php?action=query&generator=search&gsrsearch=favicon.ico&gsrlimit=20&prop=pageimages%7Cextracts&exchars=100&exintro=true&explaintext=true&exlimit=max&format=json&origin= TypeError: cookies is not iterable at get [headers map sorted] (node:internal/deps/undici/undici:1844:34) at node:internal/deps/undici/undici:1865:43 at Headers Iterator.next (node:internal/deps/undici/undici:1108:26) at Function.fromEntries () at /home/monty/nextjstutorial2/next05/node_modules/next/dist/server/lib/patch-fetch.js:135:49 error - TypeError: cookies is not iterable error - TypeError: cookies is not iterable digest: "3550467805"

The request is actually being made and I do get the data returned so Im sure that this must be a typescript issue