NEXT.js 시작하기

mason.98·2022년 8월 31일
0

NEXT

목록 보기
1/6
post-thumbnail

📂 프로젝트 시작

1-1. Next.js 프로젝트 초기화
npx create-next-app@latest

1-2. Next.js 프로젝트 초기화(+타입스크립트)
npx create-next-app@latest --typescript


📂 프로젝트 실행

프젝시작

VSC에서 터미널 명령어 npm run dev 입력 후,
http://localhost:3000/ (로컬호스트)로 접속


📂 프로젝트 화면

프젝화면


📂 발생 가능한 오류들

첫번째 오류 👀

오류내용

throw er; // Unhandled 'error' event

해결방법
npx create-next-app 프로젝트이름 --use-npm
npx create-next-app 프로젝트이름 --use-npm --typescript
https://github.com/vercel/next.js/issues/35623

두번째 오류 👀

오류내용
npm run dev 오류
error - Failed to load next.config.js, see more info here

해결방법
최신버전 node 설치
https://nodejs.org/ko/

profile
wannabe---ing

0개의 댓글