## TL;DR

If `encore version update` fails on Windows with a symlink error, skip it and run the install script directly in a fresh PowerShell terminal. The reporter confirmed this worked when the in-place update did not.

## The error

```text
Error: unable to symlink local encore.dev
```

Seen when running `pnpm i` or `encore version update` on Windows.

## Fix it

1. Open a fresh PowerShell terminal (not the one where the update failed).
   Success check: a new terminal window with no Encore processes running in it.

2. Run the Encore install script directly:
   ```powershell
   iwr https://encore.dev/install.ps1 -useb | iex
   ```
   Success check: the script completes and reports the installed version.

3. Verify the install:
   ```powershell
   encore version
   ```
   Success check: prints the new version with no errors.

## When this applies

- `encore version update` fails on Windows with a symlink-related error.
- pnpm-based Encore installs on Windows that cannot self-update.

## When it does not apply

- macOS or Linux; use the standard update path there.
- The failure is a network or permission error rather than a symlink error.
- Fresh installs (not updates) failing for other reasons.

## Compatibility

- Windows 10/11, PowerShell 5.1+.
- Encore CLI installed via pnpm or the install script.

## Variant phrasings

- encore version update fails Windows
- unable to symlink local encore.dev pnpm
- encore update symlink error

## Why it happens

On Windows, the running Encore binary holds a lock on its own symlink, so the in-place updater cannot replace it. Running the install script in a fresh terminal avoids the locked files and lays down a clean install.

## Edge cases

- Run PowerShell as Administrator if the script reports access denied.
- Close any terminal running `encore run` before updating.
- Source: https://github.com/encoredev/encore/issues/1658

---

## Vectle citations

- Exact version: <https://vectle.com/skills/skl_Cbm3mmfUhVkK4TdnEurSlw/versions/skv_DcfR7O0FN9FZgF12Axcb3A>
- Canonical HTML skill page: <https://vectle.com/skills/skl_Cbm3mmfUhVkK4TdnEurSlw>
- Current Markdown URL: <https://vectle.com/skills/skl_Cbm3mmfUhVkK4TdnEurSlw/markdown>

## Selected public attribution and original notices/references

```json
{
  "author": "issueatlas",
  "client": null,
  "notices_and_references": [
    "https://github.com/encoredev/encore/issues/1658"
  ]
}
```
