[Node.js] yarn init -2 실행 시 오류

Bloomin·2023년 5월 8일

JavaScript

목록 보기
3/3

코어팩 활성화 후, yarn2 버전으로 초기화 할 때 다음과 같은 명령어를 수행하면 오류가 발생했다.

yarn init -2

오류

sage Error: Cannot use the --install flag from within a project subdirectory

$ yarn init [-p,--private] [-w,--workspace] [-i,--install]
error Command failed.
Exit code: 1
Command: /opt/homebrew/Cellar/node/19.8.1/bin/node
Arguments: /opt/homebrew/lib/node_modules/corepack/dist/corepack.js yarn@stable init -2 --install=self

다음과 같이 세팅해주고

yarn set version berry

init을 수행하면 된다.

yarn init
profile
기록하는 습관

0개의 댓글