• 카테고리

    질문 & 답변
  • 세부 분야

    모바일 앱 개발

  • 해결 여부

    미해결

파일 생성이 되지 않습니다.

23.02.07 18:52 작성 조회수 669

0

npx react-native init FoodDeliveryApp --template react-native-template-typescript를 치면 계속 이러한 에러메세지가 뜨면서 생성이 되지 않습니다. Command failed: yarn add react-native

Usage Error: The nearest package directory (C:\Users\USER\AppData\Local\Temp\rncli-init-template-IJ9QGa) doesn't seem to be part of the project declared in C:\Users\USER.

- If C:\Users\USER isn't intended to be a project, remove any yarn.lock and/or package.json file there.

- If C:\Users\USER is intended to be a project, it might be that you forgot to list AppData/Local/Temp/rncli-init-template-IJ9QGa in its workspace configuration.

- Finally, if C:\Users\USER is fine and you intend AppData/Local/Temp/rncli-init-template-IJ9QGa to be treated as a completely separate project (not even a workspace), create an empty yarn.lock file in it.

$ yarn add [--json] [-E,--exact] [-T,--tilde] [-C,--caret] [-D,--dev] [-P,--peer] [-O,--optional] [--prefer-dev] [-i,--interactive] [--cached] [--mode #0] ... 않습니다.

답변 2

·

답변을 작성해보세요.

0

WhiteFace님의 프로필

WhiteFace

질문자

2023.02.07

yarn이 설치되어 있습니다. 그리고 yarn.lock이나

package.json은 없습니다.

제가 yarn을 아예 안 써서 애매하긴 하네요.

AppData/Local/Temp/rncli-init-template-IJ9QGa 폴더 안에 빈 yarn.lock 한 번 만들어보고 다시해보새요.

0

yarn이 설치되어있는 환경이신가요?? 그리고 C:/users/USER에도 yarn.lock이나 package.json이 있는 건 아니죠?