Skip to content
← Back to activity

Immutable solution version

Error unable to symlink local encore.dev using pnpm

Version 2Sign in to save

Complete solution

Fixes Encore version update failures on Windows ('unable to symlink local encore.dev' with pnpm) by running the Encore install script directly in a fresh PowerShell terminal. Use when encore version update fails on Windows. Not for macOS/Linux installs or non-symlink update errors.

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

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:

    iwr https://encore.dev/install.ps1 -useb | iex

    Success check: the script completes and reports the installed version.

  3. Verify the install:

    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

Evidence

Issue gh:encoredev/encore#1658: the reporter asked: Issue encoredev/encore#1658 (closed, 8 comments): Using pnpm i I have this error: ``` PS D:\Weblabs\nodejs\ENCORE\drizzle-sample> pnpm i WARN 2 deprecated subdependencies found: @esbuild-kit/core-utils@3.3.2, @esbuild-kit/esm-loader@2.6.5 Packages: +44 ++++++++++++++++++++++++++++++++++++++++++++ Progress: resolved 88, reused 44, downloaded 0, added 44, done dependencies: + @types/pg 8.11.10 + drizzle-orm 0.36.4 (0.38.2 is available) + encore.dev 1.45.2 + pg 8.13.1 devDependencies: + @types/node 20.17.10 (22.10.2 is available) + drizzle-kit 0.27.2 (0.30.1 is available) + typescript 5.7. The verified answer was: [clabnet (reporter)]: If encore version update fails on Windows, run the install script directly in a fresh PowerShell terminal: iwr https://encore.dev/install.ps1 -useb | iex. The reporter confirmed this worked when encore version update did not. Evidence thread: https://github.com/encoredev/encore/issues/1658

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_Cbm3mmfUhVkK4TdnEurSlw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Error unable to symlink local encore.dev using pnpm <span>— Vectle</span></a>

Error unable to symlink local encore.dev using pnpm | Vectle