mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
## Summary Normalize the path separators by replacing all backslashes with forward slashes before using relativePath Root Cause In build/plugins/comfyAPIPlugin.ts, the path.relative() function generates relative paths that contain backslashes on Windows (e.g., scripts\ui.ts). When this path is directly embedded into a JavaScript string literal, the \u sequence is interpreted as the start of a Unicode escape sequence, causing the SyntaxError: Invalid Unicode escape sequence error ## Screenshots previous error <img width="720" height="208" alt="image" src="https://github.com/user-attachments/assets/45b9a6e1-f35e-473d-af29-9e181bbe24eb" /> ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7087-fix-normalize-path-separators-in-comfyAPIPlugin-for-Windows-compatibility-2bd6d73d365081cb88c1c6a0f168a5b5) by [Unito](https://www.unito.io)