221219_TIL

·2022년 12월 19일
0
Usage Error: The nearest package directory (/Users/내폴더/Desktop/ReactYarn) doesn't seem to be part of the project declared in --내폴더.

- If /Users/내이름 isn't intended to be a project, remove any yarn.lock and/or package.json file there.
- If /Users/내이름 is intended to be a project, it might be that you forgot to list Desktop/ReactYarn in its workspace configuration.
- Finally, if /Users/내이름 is fine and you intend Desktop/ReactYarn to be treated as a completely separate project (not even a workspace), create an empty yarn.lock file in it.

$ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] <scriptName> ...
➜  ReactYarn git:(main) ✗

이거 하루종일 봤음. npm쓰다가 자잘한 에러가 많이 나서 스트레스 받아서 yarn으로 넘어오려다가 저 에러를 7시부터 계속 보았다.
해결 아직 못 했음. 추후 해결 후에 업데이트 예정

해결 방법 :
Mac 기준으로 Documment에서 숨김 폴더를 다 풀고 yarn과 관련된 폴더를 전부 삭제 후, 다시 설치하면 됩니다.

그러나 웬만하면 npm 사용하는 것이 좋을 것 같습니다. 예전과 달리 버전 관리 및 속도도 yarn과 npm은 차이가 없을 정도로 격차가 좁아졌기 때문입니다..

profile
- 배움에는 끝이 없다.

0개의 댓글