본문 바로가기
☠️ 트러블슈팅

NPM Capital letters 설치 오류

by 슬용이 2022. 5. 16.

리액트 연습을 위해 폴더를 만들고 npx create-react-app . 을 실행했는데 오류가 생겼다.

name can no longer contain capital letters 말 그대로 대문자를 포함할 수 없다는 것이다.

 

devseulgi@Seulgiui-MacBookAir ReactPractice % npx create-react-app .
Cannot create a project named "ReactPractice" because of npm naming restrictions:

  * name can no longer contain capital letters

Please choose a different project name.
devseulgi@Seulgiui-MacBookAir ReactPractice %

 

관련하여 찾아보니 NPM에 대문자를 사용할 수 없는 이유는 unix 파일 시스템이 대소문자를 구분하기 때문이다. 최종 응용 프로그램이 Windows처럼 대소문자를 구분하지 않는다면 중요하지 않지만, 그렇지 않을 경우 혼돈을 야기할 수 있기에 미연에 방지한 것으로 보인다.

 

폴더명을 ReactPractice에서 react-practice로 변경하니 잘 설치되는 것을 볼 수 있다.

 

devseulgi@Seulgiui-MacBookAir react-practice % npx create-react-app .

Creating a new React app in /Users/devseulgi/Desktop/study/react-practice.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

 

코드를 쓰면서 camelCasePascalCase를 많이 썼더니 대문자를 쓰는 것이 버릇이 되었는데,

리액트 폴더명을 만들 때는 꼭 기억해서 에러메시지를 줄이도록 해야겠다.

 

 


참조

https://github.com/facebook/create-react-app/issues/2165

 

 

 

댓글