Why? That changes the lockfile, which you really don’t want to do (unless you’re deliberately trying to change Discourse’s dependencies). If you don’t want to change dependencies, the only pnpm command you should ever need is pnpm install
.
The issues you’ve described sound like they could be caused if your pnpm lockfile has diverged from core’s. I’d recommend checking for any diff (e.g. via git status
, or whatever git GUI you use). If there is a diff, reset it (e.g. via git restore pnpm-lock.yaml
)
Possibly related: I’d recommend removing --fix-lockfile
from your install script. Core’s lockfile should never need ‘fixing’, so running this locally is only likely to cause divergence.
BTW have you tried using the devcontainer setup. It aims to almost completely remove this kind of maintenance.
Although admittedly, if this problem is indeed that you’ve modified your pnpm lockfile, then it could happen in the devcontainer as well