SurfSense
SurfSense copied to clipboard
[Bug] Plasmo build fails with path resolution error on Windows: "Failed to resolve '../../popup.tsx'"
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
- Clone the repository
- Navigate to surfsense_browser_extension
- Run
pnpm install - 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'
Analysis
- The
.plasmo/static/popup.tsxfile 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.