본문 바로가기
프로그래밍/ReactJS

Server Error ReferenceError: window is not definedThis error happened while generating the page. Any

by astraljoker 2022. 4. 19.
728x90
반응형

Server Error ReferenceError: window is not definedThis error happened while generating the page. Any console logs will be displayed in the terminal window.

import dynamic from 'next/dynamic'

const DynamicComponent = dynamic(() => import('../components/hello'))

function Home() {
  return (
    <div>
      <Header />
      <DynamicComponent />
      <p>HOME PAGE is here!</p>
    </div>
  )
}

export default Home

 

동격 가져로기로 에러해결

728x90
반응형

댓글