Skip to content
Latchkey

Plasmo "plasmo build" failed in CI

plasmo build compiles the extension and writes a packaged build directory. It exits non-zero when an entry file, manifest override, or imported asset cannot be resolved during the build.

What this error means

The plasmo build step fails with a Failed to ... message naming a missing module, entry, or asset, and the build directory is not produced.

plasmo
🟣 Plasmo v0.88
🔴 ERROR  | Failed to resolve import "~components/Popup" from "popup.tsx"
🔴 ERROR  | Build failed

Common causes

An unresolved import or entry path

A ~-aliased import or a content-script entry points at a file that does not exist at the path Plasmo expects.

A manifest override referencing a missing asset

The manifest field in package.json references an icon or page not present in the build.

How to fix it

Resolve the failing import or entry

  1. Read the path in the "Failed to resolve" line.
  2. Correct the import alias or create the missing entry file.
  3. Re-run plasmo build.
Terminal
plasmo build --target=chrome-mv3

Match the manifest override to real assets

Ensure icons and pages referenced by the package.json manifest override exist in the source.

package.json
"manifest": {
  "host_permissions": ["https://*/*"]
}

How to prevent it

  • Run plasmo build in CI on every change.
  • Keep import aliases and entry paths consistent.
  • Reference only existing assets in the manifest override.

Related guides

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