project_professional_portfolio icon indicating copy to clipboard operation
project_professional_portfolio copied to clipboard

line 105 work.jsx {work.tags[0]} GIVES ME WHITE SCREEN OF DEATH

Open luespinal03 opened this issue 2 years ago • 2 comments

'Uncaught TypeError: Cannot read properties of undefined (reading '0')' Screenshot 2022-11-04 at 1 15 33 AM

luespinal03 avatar Nov 04 '22 05:11 luespinal03

Hey @luespinal03 Make sure you have not added a blank/incomplete document in Sanity>>Works

JuniorRaja avatar Nov 09 '22 02:11 JuniorRaja

Hi @luespinal03 , that "0" that is returning undefined is probably because you need to set your localhost in API configuration in your project manager in Sanity. This happened to me recently. In my project manager, in the API configuration, only port 3000 had access to what came from Sanity but I was using port 3001, so instead of my "work" being rendered on the screen, only "0" was rendered. If your problem is not defining localhost in the project manager settings, then the error is probably related to the "Work" section that you defined in your Sanity.

lucas-de-lima avatar Feb 21 '23 17:02 lucas-de-lima