HelloMinchan
처음처럼
HelloMinchan
LinkedIn
전체 방문자
오늘
어제
  • 분류 전체보기 (306)
    • Backend (4)
      • NestJS (1)
      • Express (1)
      • Spring (2)
    • Infrastructure (1)
      • AWS (1)
    • Frontend (1)
      • Next.js (1)
    • Language & Runtime (4)
      • Java (2)
      • Node.js (2)
    • Computer Science (8)
      • Computer Networks (3)
      • Operating Systems (4)
      • OOP (1)
    • 독서 (4)
      • 데이터 중심 애플리케이션 설계 (3)
      • 객체지향의 사실과 오해 (1)
    • 회고 (4)
      • Project (2)
      • Career (2)
    • Deprecated (280)

채널

  • GitHub
  • LinkedIn

최근 글

태그

  • Baekjoon Online Judge
  • Algospot
  • 프로그래밍
  • 백준Go
  • front-end
  • 데이터베이스
  • 프로그래머스
  • Database
  • back-end
  • 프로그래머스C++
  • 백준
  • 백준Python
  • 알고스팟
  • programmers
  • 알고스팟Python
  • 백엔드
  • 백준C++
  • 프로그래머스Python
  • 코딩
  • 개발자

최근 댓글

인기 글

hELLO
HelloMinchan

처음처럼

[Troubleshooting] React, create-react-app으로 프로젝트 시작 시 템플릿 생성이 안되는 문제
Deprecated

[Troubleshooting] React, create-react-app으로 프로젝트 시작 시 템플릿 생성이 안되는 문제

2020. 2. 23. 05:07

Copyright © 2020 Facebook Inc.

[Troubleshooting] React, create-react-app으로 프로젝트 시작 시 템플릿 생성이 안되는 문제

(글쓴날 : 2020.02.23)

 


* React Hook 공부를 위해 React 프로젝트를 생성하다 발생했습니다.


 

 

문제 해결 과정


1) 원인 파악

기존에 설치되어 있던 create-react-app이 최신 버전이 아니었고, 설치할 당시 -g 옵션으로 전역 설치했었습니다.

 

* 에러 메시지

A template was not provided. This is likely because you're using an outdated version of create-react-app. Please note that global installs of create-react-app are no longer supported.


2) 해결 방법

 

(1) npm uninstall -g create-react-app || yarn global remove create-react-app

npm 또는 yarn으로 설치하셨던 기존의 create-react-app을 삭제합니다.


(2) npx create-react-app example

위에서 create-react-app을 삭제하셨다면, 다시 설치하지 마시고 npx 명령어를 사용해 create-react-app을 사용하시길 권장합니다. (create-react-app은 비교적 자주 사용하지 않을뿐더러 새 버전이 나올 때마다 삭제와 설치를 반복해야 하기 때문입니다.)

 

다른 방법으로는,

npm init react-app example

yarn create react-app example

과 같은 방법이 있습니다.


* 해결이 안 될 경우

which create-react-app

위의 which 명령어를 입력하셨을 때 만약 create-react-app의 경로가 출력된다면 삭제가 제대로 되지 않은 것이므로,

rm -rf (출력된 경로)

명령을 통해 해당 설치경로를 수동으로 삭제해주시면 되겠습니다.


 

 


 

 

느끼는 바는, 역시 버전 아니면 Dependency가 대부분 문제의 원인인 것 같습니다.

저작자표시 비영리 변경금지 (새창열림)

'Deprecated' 카테고리의 다른 글

[Go] Go 언어 예제와 기본 문법 정리 4탄(반복문 for, 함수 func)  (0) 2020.02.25
[React] React Hooks란 무엇인가?  (2) 2020.02.24
[Realm] Realm이란 무엇인가?  (2) 2020.02.22
[Go] Go 언어 예제와 기본 문법 정리 3탄(조건문 if, switch)  (2) 2020.02.17
[Go] Go 언어 예제와 기본 문법 정리 2탄(변수 var, 상수 const)  (0) 2020.02.16
    'Deprecated' 카테고리의 다른 글
    • [Go] Go 언어 예제와 기본 문법 정리 4탄(반복문 for, 함수 func)
    • [React] React Hooks란 무엇인가?
    • [Realm] Realm이란 무엇인가?
    • [Go] Go 언어 예제와 기본 문법 정리 3탄(조건문 if, switch)
    HelloMinchan
    HelloMinchan
    Though you should not fear failure, You should do your very best to avoid it.

    티스토리툴바