TsotneDarjania/nextjs-sanity-starter

Not being able to run the initial app

Closed this issue · 1 comments

I followed instructions for using this template as a base, I created an account on Sanity.io and created a project which gave me the required project id and the production dataset. Then I proceeded to create a .env.local file and added the variables to the file with the project id and dataset variables, and also included the SANITY_API_READ_TOKEN which I created on the sanity website under the API section and created it with viewers permissions. Then I went to do the npm install and npm run dev. The npm install runs the installation without issues. When I do the npm run dev and I try to load the page it starts giving me following error Unhandled Runtime Error
Error: Cannot read properties of null (reading 'nav') Source src\ui\layout\header\index.tsx (22:14) @ nav.

So in this case I dont know what to do, I tried investigating these routes on the error, and it seems there is a types error, but I would not be sure of it!.

Can you please tell me if I did something wrong? I tried following the simple steps to get it running but it seems something is not quite right!

Let me know if you can guide me on getting the template up and running!

Best,
Juan