Skip to content
Latchkey

PlatformIO "UnknownPackageError" platform not found in CI

PlatformIO tried to install the platform named in your platform line and the package manager could not resolve it. The name, version, or source spec does not match anything the registry will serve.

What this error means

On a clean runner, pio run fails during dependency setup with "UnknownPackageError: Could not find the package with '<spec>' requirements".

PlatformIO
UnknownPackageError: Could not find the package with 'espressif32 @ 99.0.0' requirements for your system 'linux_x86_64'

Common causes

A pinned platform version does not exist

The @ <version> constraint points at a release the registry never published, so the resolver finds no candidate.

The platform name or git source is wrong

A misspelled platform name, or a git/URL source that no longer resolves, leaves the package manager with nothing to fetch.

How to fix it

Pin a version that the registry publishes

  1. Search available versions with pio pkg search espressif32.
  2. Set platform to a real published version or a valid git source.
  3. Re-run so the package manager can resolve and install it.
platformio.ini
[env:esp32dev]
platform = espressif32@6.7.0
board = esp32dev
framework = arduino

Install the platform explicitly to surface the error early

Run an explicit install step so a bad spec fails before the build instead of mid-compile.

Terminal
pio pkg install --platform "espressif32@6.7.0"

How to prevent it

  • Pin platform versions to releases you confirmed exist.
  • Cache ~/.platformio so resolved platforms persist between runs.
  • Verify git/URL platform sources are reachable from CI.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →