다른 사람의 코드를 따라 작성하려고 프로젝트를 따로 생성해서 app디렉토리를 pages 디렉토리로 변경하니 아래 에러가 나옵니다 혹시 에러가 나오는 이유를 알 수 있을까요? ✓ Ready in 3.5s ○ Compiling /_error ... ✓ Compiled /_error in 683ms (186 modules) ⚠ Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload ⚠ Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload ⚠ Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload 편집 중인 파일에는 React 구성 요소 외에 다른 내보내기가 있을 수 있습니다. React 구성 요소는 익명 함수입니다. textField구성 요소 이름은 PascalCase가 아닌 camelCase로 되어 있습니다 TextField.
app 디렉토리(App Router)는 pages와 구조 및 기능이 다르기 때문에 그대로 사용하면 에러가 발생합니다. 해결 방법은, layout.tsx → _app.tsx로 변경page.tsx → index.tsx로 변경컴포넌트 이름은 PascalCase 사용 (예: TextField)export default로 React 컴포넌트만 내보내기