Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update for nextjs 13 #9

Open
MincePie opened this issue Nov 19, 2022 · 0 comments
Open

update for nextjs 13 #9

MincePie opened this issue Nov 19, 2022 · 0 comments

Comments

@MincePie
Copy link

MincePie commented Nov 19, 2022

Hi John,

Thank you for making this egghead course. I am a very slow learner.

I am stuck on lesson 4 in your tutorial. I think the issue might have something to do with a change in nextjs v 13. This stackoverflow post has a suggestion, which is to change the Home function into a const with an arrow in it. I tried it as follows but still can't get past this step.

import { supabase } from '../utils/supabase'

const Home = ({lessons}) => {
  
  return (
    <div className="flex min-h-screen flex-col items-center justify-center py-2">
      {lessons.map( lesson => (
        <p key={lesson.id}>{lesson.title}</p>
      ))}
    </div>
  )
}

export default Home;

export const getStaticProps = async () => {
  const { data: lessons } = await supabase.from('lesson').select('*')

  return { props: { lessons } }
}

My error message is in the browser is:

Error: Failed to fetch update manifest Internal Server Error
at http://localhost:3000/_next/static/chunks/webpack.js?ts=1668894571923:1188:37

My error message in the terminal is:

TypeError: Cannot read properties of null (reading 'length')
at eval (webpack-internal:///./node_modules/next/dist/client/dev/error-overlay/hot-dev-client.js:262:55)

Do you have any ideas on how to get past this error?

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant