@@ -131,12 +131,37 @@ on a project where the `packageManager` field references `pnpm`).
131131| --------------------- | --------------------------------------- |
132132| ` --install-directory ` | Add the shims to the specified location |
133133
134- This command will detect where Node.js is installed and will create shims next
134+ This command will detect where Corepack is installed and will create shims next
135135to it for each of the specified package managers (or all of them if the command
136136is called without parameters). Note that the npm shims will not be installed
137137unless explicitly requested, as npm is currently distributed with Node.js
138138through other means.
139139
140+ If the file system where the ` corepack ` binary is located is read-only, this
141+ command will fail. A workaround is to add the binaries as alias in your
142+ shell configuration file (e.g. in ` ~/.bash_aliases ` ):
143+
144+ ``` sh
145+ alias yarn=" corepack yarn"
146+ alias yarnpkg=" corepack yarnpkg"
147+ alias pnpm=" corepack pnpm"
148+ alias pnpx=" corepack pnpx"
149+ alias npm=" corepack npm"
150+ alias npx=" corepack npx"
151+ ```
152+
153+ On Windows PowerShell, you can add functions using the ` $PROFILE ` automatic
154+ variable:
155+
156+ ``` powershell
157+ echo "function yarn { corepack yarn `$args }" >> $PROFILE
158+ echo "function yarnpkg { corepack yarnpkg `$args }" >> $PROFILE
159+ echo "function pnpm { corepack pnpm `$args }" >> $PROFILE
160+ echo "function pnpx { corepack pnpx `$args }" >> $PROFILE
161+ echo "function npm { corepack npm `$args }" >> $PROFILE
162+ echo "function npx { corepack npx `$args }" >> $PROFILE
163+ ```
164+
140165### ` corepack disable [... name] `
141166
142167| Option | Description |
0 commit comments