개발/Next
Next + React + typescript 프로젝트 생성 명령어
yo.na
2023. 11. 11. 13:52
오랜만에 프로젝트를 생성해봤는데 역시 한번에 생성되지 않네요!
1. 프로젝트 생성 명령어
타입스크립트 안쓰면 app 까지만 입력.
npx create-next-app --typescript
2. 오류
아래와 같이 노드 버전 오류가 남.
error next@14.0.2: The engine "node" is incompatible with this module. Expected version ">=18.17.0". Got "18.8.0"
error Found incompatible module.
3. 아래 명령어 순서대로 입력
npm install -g n
npm cache clean -f
sudo n stable
명령어 실행 후 다시 1의 프로젝트 생성 명령어 입력했더니 성공적으로 프로젝트 생성할수 있었다.
참고