Error: Cannot read properties of undefined (reading 'results')
Closed this issue · 2 comments
JOduMonT commented
Hey I'm following you via ZtM and at the lesson 13 you deploy this repo, but on my side I have an error:
step to reproduce
try 1
git clone
the repocd repo
npm install
npm run dev
try 2
git clone
the repocd repo
npm install
npm audit fix
npm run dev
error
error - TypeError: Cannot read properties of undefined (reading 'results')
at getListOfCoffeeStorePhotos (D:\Public\discover-coffee-stores\.next\server\pages\index.js:276:43)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async fetchCoffeeStores (D:\Public\discover-coffee-stores\.next\server\pages\index.js:281:18)
at async getStaticProps (D:\Public\discover-coffee-stores\.next\server\pages\index.js:3107:24)
at async Object.renderToHTML (D:\Public\discover-coffee-stores\node_modules\next\dist\server\render.js:329:24)
at async doRender (D:\Public\discover-coffee-stores\node_modules\next\dist\server\next-server.js:1144:38)
at async D:\Public\discover-coffee-stores\node_modules\next\dist\server\next-server.js:1236:28
at async D:\Public\discover-coffee-stores\node_modules\next\dist\server\response-cache.js:64:36 {
page: '/'
}
wait - compiling...
event - compiled successfully
kulkarniankita commented
Hey! Can you share your repo link so we can see what’s going on? And also do you have the environment variable for unsplash set on Vercel? As that’s important otherwise there are no images
JOduMonT commented
it is in local, and no I didn't have the environment variable for unsplash set on Vercel.
Anyway, I was just curisous, I started the course from scratch, with time I'll probably figure it out ;)
thank for your quick reply; great job with the course and have a great day from an another Canadian based in Bangkok ;)