코딩/오류처리

[NextJS] Error: Could not find a production build in the '.next' directory. Try building your app with 'next build' before starting the production server

해보^^ 2024. 10. 22. 10:42
반응형

■ 현상

npx create-next-app@latest 명령어로 신규프로젝트를 만들고 npm start를 실행했으나 오류발생

오류 메시지
오류 메시지

   

 

■ 해결

아래 순서로 처리하니 해결됨. 오류 메시지 자체가 빌드후 실행하라는 메시지

\> npm run build

\> npm start

 

 

반응형