File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ pairing with smart people at Hashrocket.
10
10
11
11
For a steady stream of TILs, [ sign up for my newsletter] ( https://crafty-builder-6996.ck.page/e169c61186 ) .
12
12
13
- _ 1257 TILs and counting..._
13
+ _ 1258 TILs and counting..._
14
14
15
15
---
16
16
@@ -1286,6 +1286,7 @@ _1257 TILs and counting..._
1286
1286
- [ Add Web Server Layer Redirects] ( vercel/add-web-server-layer-redirects.md )
1287
1287
- [ Deploy An App Without Pushing An Empty Commit] ( vercel/deploy-an-app-without-pushing-an-empty-commit.md )
1288
1288
- [ Naming Of The Vercel Config File] ( vercel/naming-of-the-vercel-config-file.md )
1289
+ - [ Pin Specific pnpm Version For Builds] ( vercel/pin-specific-pnpm-version-for-builds.md )
1289
1290
- [ Share Development Environment Variables Via CLI] ( vercel/share-development-environment-variables-via-cli.md )
1290
1291
1291
1292
### Vim
Original file line number Diff line number Diff line change
1
+ # Pin Specific pnpm Version For Builds
2
+
3
+ Vercel recognizes when [ a project contain a ` pnpm-lock.yaml `
4
+ file] ( https://vercel.com/changelog/projects-using-pnpm-can-now-be-deployed-with-zero-configuration )
5
+ and will automatically use [ ` pnpm ` ] ( https://pnpm.io/ ) for builds of that
6
+ project.
7
+
8
+ It looks for [ the ` lockfileVersion ` in ` pnpm-lock.yaml ` to determine what major
9
+ version of ` pnpm ` to
10
+ install] ( https://vercel.com/docs/concepts/deployments/configure-a-build#install-command ) .
11
+ If the ` lockfileVersion ` is ` 5.4 ` , then it will use the latest pnpm v7.
12
+ Otherwise it will fallback to the latest pnpm v6.
13
+
14
+ That's the extent of the control you have over the ` pnpm ` version. That is,
15
+ unless you are to use [ this experimental corepack
16
+ feature] ( https://vercel.com/docs/concepts/deployments/configure-a-build#corepack ) .
17
+ Set the ` ENABLE_EXPERIMENTAL_COREPACK ` environment variable to ` 1 ` in your
18
+ project's _ Environment Variables_ under _ Settings_ .
19
+
20
+ Then specify the ` pnpm ` version with the ` packageManager ` key in your
21
+ ` package.json ` .
22
+
23
+ ``` json
24
+ {
25
+ "packageManager" :
" [email protected] "
26
+ }
27
+ ```
28
+
29
+ Even though the current latest is ` 7.13.5 ` , Vercel will see the Corepack
30
+ environment variables and the ` packageManager ` version and use ` 7.13.2 `
31
+ instead.
32
+
33
+ See [ this PR] ( https://github.com/skillrecordings/products/pull/535 ) and [ this
34
+ issue] ( https://github.com/prisma/prisma/issues/12921#issuecomment-1284425847 )
35
+ for more details.
You can’t perform that action at this time.
0 commit comments