본문 바로가기

코딩탐방기

"워크스페이스 이름을 넣으라고?" yarn add mui-tel-input@latest 전화번호 형식 폼 라이브러리 설치하기 | error Running this command will add the dependency to the workspace root rather than the workspace

728x90
반응형
yarn add mui-tel-input@latest

새로 하는 프로젝트에 국가별 전화번호 형식 폼 쓰려고

perplexity에서 추천해준 mui-tel-input을 설치하려는데

yarn add v1.22.22
error Running this command will add the dependency to the workspace root rather than the workspace itself, which might not be what you want - if you really meant it, make it explicit by running this command again with the -W flag (or --ignore-workspace-root-check).
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

이런 에러가..

루트말고 workspace를 입력하라는데 

뭔소리징..?

워크스페이스 이름? 프로젝트 폴더에 적힌 이름을 적어도 계속 안되길래

구글링해보니 workspace 이름 찾는 과정을 알려줌 ㅋㅋ

먼저 가장 바깥에 있는 package.json 에 들어가면

workspaces가 보인당

그래서 이 이름을 넣었는데 이것도 아니엿고

이  apps 하위 package.json이 또 따로 있었음 ㅋㅋㅋ

거기에 name이 workspace 이름임 ㅋㅋㅋㅋ

yarn workspace web add mui-tel-input

성공ㅋㅋ

이렇게 치니깐 잘 설치됐당 ㅋㅋ

해당 워크스페이스의 package.json 에도 잘 설치된 것을 확인완료!

728x90
반응형