SurfSense icon indicating copy to clipboard operation
SurfSense copied to clipboard

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

Open unitagain opened this issue 2 months ago • 0 comments

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

  • This issue was discovered while fixing #413 (sharp module error)
  • The sharp issue is resolved in PR #505, but this Plasmo bug prevents successful builds on Windows

Additional Context

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

unitagain avatar Nov 27 '25 06:11 unitagain