Skip to content

Commit 94148f4

Browse files
committed
Fix: pnpm issues workaround.
1 parent 3bd665b commit 94148f4

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

builder/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,9 @@ fn run_install(dev: bool) -> io::Result<()> {
336336
if dev {
337337
run_script("npm", &["install", "-g", "pnpm@latest-10"], ".", true)?;
338338
}
339-
run_script("pnpm", &["install"], "../client", true)?;
339+
// See [the client manifest](../../client/package.json5) for an explanation
340+
// of `--no-frozen-lockfile`.
341+
run_script("pnpm", &["install", "--no-frozen-lockfile"], "../client", true)?;
340342
patch_client_libs()?;
341343
run_script("pnpm", &["install"], "../extensions/VSCode", true)?;
342344
run_cmd!(

client/package.json5

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,23 @@
7070
of this library. Per [this pnpm
7171
issue](https://github.com/pnpm/pnpm/issues/6714), `pnpm` will
7272
auto-rewrite this incorrectly, so manually revert changes after each
73-
`pnpm update`. */
73+
`pnpm update`. However, reverting these changes causes the following
74+
error:
75+
76+
```
77+
ERR_PNPM_OUTDATED_LOCKFILE  Cannot install with "frozen-lockfile" because pnpm-lock.
78+
yaml is not up to date with <ROOT>/package.json
79+
80+
Note that in CI environments this setting is true by default. If you still need to
81+
run install in such cases, use "pnpm install --no-frozen-lockfile"
82+
83+
Failure reason:
84+
specifiers in the lockfile don't match specifiers in package.json:
85+
* 1 dependencies are mismatched:
86+
- pdfjs-dist (lockfile: ^5.3.93, manifest: ~5 < 5.4.54 || ~5.4.55)
87+
```
88+
89+
So, installs in CI must have the `--no-frozen-lockfile` CLI flag. */
7490
'pdfjs-dist': '~5 < 5.4.54 || ~5.4.55',
7591
tinymce: '^8.0.1',
7692
'toastify-js': '^1.12.0',

0 commit comments

Comments
 (0)