sanity-io / sanity-template-nextjs-landing-pages

A Sanity powered landing page builder in Next.js for https://sanity.io/create
https://www.sanity.io/create/?template=sanity-io%2Fsanity-template-nextjs-landing-pages
158 stars 54 forks source link

Failed prop type on loading the front-end (localhost:3000) #63

Open davidverity opened 2 years ago

davidverity commented 2 years ago

Hello, I started using this repo/template and when I try to access the front-end after running npm install and npm run dev in the root folder, I am receiving those warnings, even without changing anything in the code:

next-dev.js?3515:32 Warning: Failed prop type: Invalid propnavItems[0].slugof typeobjectsupplied toHeader, expected an array. at Header (webpack-internal:///./components/Header.js:130:9) at WithRouterWrapper (webpack-internal:///./node_modules/next/dist/client/with-router.js:18:34) at div at Layout (webpack-internal:///./components/Layout.js:22:24) at LandingPage (webpack-internal:///./pages/[[...slug]].js:29:24) at App (webpack-internal:///./pages/_app.js:172:9) at ErrorBoundary (webpack-internal:///./node_modules/next/dist/compiled/@next/react-dev-overlay/client.js:8:20584) at ReactDevOverlay (webpack-internal:///./node_modules/next/dist/compiled/@next/react-dev-overlay/client.js:8:23125) at Container (webpack-internal:///./node_modules/next/dist/client/index.js:359:9) at AppContainer (webpack-internal:///./node_modules/next/dist/client/index.js:793:26) at Root (webpack-internal:///./node_modules/next/dist/client/index.js:915:27)

The same happens for the footer. Did anybody have the same issue? Thanks.

PirellYO commented 2 years ago

Helo, I got the same issue with this template and can the deploy failed

LinnJS commented 2 years ago

This is an issue I got as well I can open up a tinny little PR to fix it. Looks like on the Sanity side a prop was changes from a array to an object.