Skip to content

[Bug] Plasmo build fails with path resolution error on Windows: "Failed to resolve '../../popup.tsx'" #506

@unitagain

Description

@unitagain

Description

Browser extension build fails on Windows with Plasmo path resolution error.

Environment

  • OS: Windows 11
  • Node.js: v22.19.0 (also tested on v22.0.0)
  • pnpm: 10.19.0
  • Plasmo: 0.89.4 and 0.90.5 (both affected)

Steps to Reproduce

  1. Clone the repository
  2. Navigate to surfsense_browser_extension
  3. Run pnpm install
  4. Run pnpm build

Expected Behavior

Extension builds successfully

Actual Behavior

Build fails with error:

🟣 Plasmo v0.90.5
🔴 The Browser Extension Framework
🔵 INFO   | Prepare to bundle the extension...
🔵 INFO   | Building for target: chrome-mv3
🔴 ERROR  | Failed to resolve '../../popup.tsx' from './.plasmo/static/popup.tsx'
Image

Analysis

  • The .plasmo/static/popup.tsx file is generated and contains:
    import * as Component from "../../popup.tsx"
  • The actual popup.tsx exists at project root
  • Plasmo fails to resolve the relative path ../../popup.tsx
  • This appears to be a Windows-specific path resolution issue in Plasmo

Attempted Solutions

  • ❌ Clearing cache (.plasmo, build folders)
  • ❌ Upgrading Plasmo to 0.90.5
  • ❌ Reinstalling dependencies

Workaround

Build on WSL/Linux environment (not tested yet)

Related

Additional Context

This may be an upstream Plasmo framework issue that needs to be reported to the Plasmo repository.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions