Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

222
Views
Error while connecting sanity content lake to frontend

I'm getting an error while fetching blogs from sanity to my template, I'm creating a next.js website

Error: Error: Unknown block type "undefined", please specify a serializer for it in the serializers.types prop

<PortableText
  // Pass in block content straight from Sanity.io
  content={blogs[0].content}
  projectId="oeqragbg"
  dataset="production"
  // Optionally override marks, decorators, blocks, etc. in a flat
  // structure without doing any gymnastics
  serializers = {{
    h1: (props) => <h1 style={{ color: "red" }} {...props} />,
    li: ({ children }) => <li className="special-list-item">{children}</li>,
  }}
/>

export async function getServerSideProps(context) {
  const client = createClient({
    projectId: 'oeqragbg',
    dataset: 'production',
    useCdn: false
  });
 
  const query = '*[_type == "blog"]';
  const blogs = await client.fetch(query);
  return {
    props: {
      blogs
    }
  }
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!