pnpm setup
이 명령은 pnpm의 독립 실행형 설치 스크립트에서 사용됩니다. 예를 들어, https://get.pnpm.io/install.sh에서 사용됩니다.
setup은 다음 조치를 수행합니다.
- pnpm CLI에 대한 홈 디렉토리를 생성합니다.
- 셸 구성 파일을 업데이트하여 pnpm 홈 디렉터리를
PATH에 추가합니다 - when pnpm runs as a standalone executable, installs it as a global package and writes the
pn,pnpx, andpnxscripts to$PNPM_HOME/bin
If pnpm setup cannot tell which shell configuration file to update, for example
in a container where SHELL is not set, it still installs pnpm. It then prints the
PNPM_HOME and PATH lines to add to your shell configuration yourself.
On Windows, if the registry environment values cannot be read or written,
pnpm setup still installs pnpm. It prints commands to set PNPM_HOME and
PATH in the current PowerShell session. Add these commands to your PowerShell
profile to use pnpm in future sessions without registry access.
버전 v11.18.0부터 GitHub Actions에서 실행할 때 pnpm setup은 PNPM_HOME과 전역 bin 디렉터리를 GitHub Actions 환경 파일(GITHUB_ENV 및 GITHUB_PATH)에도 추가하므로, 같은 작업의 이후 단계에서 pnpm add --global 및 기타 전역 명령을 실행할 수 있습니다.
팁
버전 v11의 pnpm으로 업그레이드한 후 pnpm setup을 실행하여 셸 구성을 업데이트하세요. 버전 v11에서는 전역으로 설치된 바이너리가 bin 하위 디렉터리에 저장되며, 이 디렉터리는 PNPM_HOME 안에 있습니다.