pnpm failure to find the Global Bin Directory when using the -g flag
@ProchaLu がすでに取り組んでいます。
2025年1月21日 から。
評価
この issue はまだ評価されていません。
説明
Some students have issues with installing @upleveled/preflight after they have successfully run the pnpm installation using corepack
The pnpm installation was completed with the code below
corepack enable
corepack prepare pnpm@latest --activate
pnpm setup
source ~/`[[ $SHELL == *"zsh" ]] && echo '.zshrc' || echo '.bash_profile'`
But running pnpm add --global @upleveled/preflight to install Preflight caused the error below, and running pnpm setup multiple times or repeating the while pnpm setup again could not solve the issue
ERR_PNPM_NO_GLOBAL_BIN_DIR Unable to find the
global bin directory
Run "pnpm setup" to create it automatically,
or set the global-bin-dir setting, or the
PNPM_HOME env variable. The global bin
directory should be in the PATH.E env variable. The global bin directory should be in the PATH.
A similar issue is reported on GitHub => https://github.com/pnpm/pnpm/issues/5883
Started a new issue in pnpm GitHub for this problem => https://github.com/pnpm/pnpm/issues/8997
Note
There was the correct pnpm setting in the .zshrc file, and preflight was also located in /Users/[email protected]/Library/pnpm/preflight which seems correct
# pnpm
export PNPM_HOME="/Users/[email protected]/Library/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
# pnpm end
Systems where this issue was reported
Hardware-Übersicht: Modellname: MacBook Pro Modell-Identifizierung: MacBookPro17,1 Modellnummer: MYD82D/A Chip: Apple M1 Gesamtanzahl der Kerne: 8 (4 Leistung und 4 Effizienz) Speicher: 8 GB Systemfirmwareversion: 11881.41.5 OS-Ladeprogrammversion: 11881.41.5 Seriennummer (System): FVFF6J1BQ05D Hardware-UUID: A8174CC5-E9AA-5CD8-933B-6D31342B6383 Bereitstellungs-UDID: 00008103-001E491E0ED2001E Status der Aktivierungssperre: AktiviertÜbersicht über die Systemsoftware: Systemversion: macOS 15.1.1 (24B91) Kernel-Version: Darwin 24.1.0 Startvolume: Macintosh HD Startmodus: Normal Gerätename: MacBook Pro von Florentine Benutzername: Florentine Ramböck (FlorentineRamboeck) Sicherer virtueller Speicher: Aktiviert Systemintegritätsschutz: Aktiviert Zeit seit dem Start: 21 Stunden und 45 Minuten
Model Name: MacBook ProModel Identifier: Mac14,9Model Number: Z17G00197FN/AChip: Apple M2 ProTotal Number of Cores: 10 (6 performance and 4 efficiency)Memory: 16 GBSystem Firmware Version: 10151.121.1OS Loader Version: 10151.121.1Serial Number (system): MMPK0JVPQTHardware UUID: 1AF749D2-A103-5260-9B98-9038F39E203DProvisioning UDID: 00006020-000661DC01D3C01EActivation Lock Status: Enabled
The following steps solved it
- run this
pnpm config set global-bin-dir /Users/[email protected]/Library/pnpm - rerun Preflight installation:
pnpm add --global @upleveled/preflight
- 主要言語
- 言語のデータがありません
- スター
- 30
- フォーク
- 18
- 平均マージ
- 22分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
upleveled/system-setup のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
upleveled/system-setup#121 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
upleveled/system-setup#46 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
upleveled/system-setup#123 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
upleveled/system-setup#122 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
upleveled/system-setup#118 ·