I've encountered this couple of times, if you're running into dependency or runtime issues and everyone on your team isn't facing the same issue, here's a clean way to reset your local setup based on the latest branch that everyone has:
package.json
from your base branch on GitHubGo to the repo directory on the development
branch and copy the full content of the package.json
file.
package.json
On your local environment (the one facing issues), replace the contents of your current package.json
with the one you just copied from the repo.
pnpm-lock.yaml
Copy the full content of pnpm-lock.yaml
from the repo and replace your local copy with it.
✅ Tip: Make sure you fully overwrite both files, don’t merge manually.
In your local project directory, run a fresh install:
pnpm install
This will install the exact dependency versions as defined in the lock file and ensure consistency.
Doing this ensures that you're using the exact same dependencies and versions as defined in the development
branch, avoiding any mismatch errors caused by outdated or mismatched packages.
This has always work for my case.
Let me know if you hit any issues during the process!