Skip to content

[Bug] deepseek-ivideo fails to open on Windows: ERR_UNSUPPORTED_ESM_URL_SCHEME ("c:") from node --import #9

Description

@Wyf0075

[Bug] deepseek-ivideo fails to open on Windows: ERR_UNSUPPORTED_ESM_URL_SCHEME ("c:") from node --import

Repo: Devin-AXIS/deepseek-design (deepseek-ivideo / external-plugins/deepseek-harness/video-studio)
Version: deepseek-ivideo 0.1.0 (hyperframes 0.7.60)
Platform: Windows 10/11, Node v24.19.0, DSH host 0.1.2-rc.1

Summary

Opening the iVideo view (Video Studio / template list) fails immediately on Windows. The DSH web process (or the spawned HyperFrames child) exits with:

node:internal/modules/esm/load:193
throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(parsed, schemes);
Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'
  at throwIfUnsupportedURLScheme (node:internal/modules/esm/load:193:11)
  ...
  at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:494:31)
  at #getOrCreateModuleJobAfterResolve (node:internal/modules/esm/loader:560:36)
  at afterResolve (node:internal/modules/esm/loader:607:52)
  at ModuleLoader.getOrCreateModuleJob (node:internal/modules/esm/loader:632:12)

The Studio frontend shows "模板暂时无法打开" (templates temporarily unavailable) / retry button.

Root cause

In deepseek-ivideo/lib/runtime-C_JDweoV.js (bundled from src, VideoRuntimeManager):

this.ownerGuardPath = fileURLToPath(new URL("./preview-owner-guard.js", import.meta.url));
// → "C:\Users\...\node_modules\deepseek-ivideo\lib\preview-owner-guard.js"  (native Windows path)

spawnCommand(args, cwd) {
  const ownsPreview = args[0] === "preview";
  return spawn(process.execPath, [
    ...ownsPreview ? ["--import", this.ownerGuardPath] : [],  // ← native path passed as ESM specifier
    ...

node --import <specifier> resolves through the ESM loader. A native Windows path (C:\...) is not a valid URL scheme, so Node throws ERR_UNSUPPORTED_ESM_URL_SCHEME: Received protocol 'c:' (the error message literally suggests "absolute paths must be valid file:// URLs").

This is Windows-only: on Linux/macOS fileURLToPath returns /path/to/file and node --import /path happens to resolve (the scheme check is skipped for absolute POSIX paths in this path), so the bug was never caught in CI/dev on Unix.

Not affected: deepseek-ippt / deepseek-idesign (no --import preview-owner guard path).

Minimal reproduction

node --import "C:\Users\<user>\node_modules\deepseek-ivideo\lib\preview-owner-guard.js" -e "1"
# → ERR_UNSUPPORTED_ESM_URL_SCHEME ('c:')

node --import "file:///C:/Users/<user>/node_modules/deepseek-ivideo/lib/preview-owner-guard.js" -e "1"
# → OK

Suggested fix

import { fileURLToPath, pathToFileURL } from "node:url";
// ...
...ownsPreview ? ["--import", pathToFileURL(this.ownerGuardPath).href] : [],

(or keep ownerGuardPath as a URL and pass .href directly to the argument list.)

One-line change in spawnCommand; also add a Windows smoke test running node --import with the guard path.

Workaround (already applied locally)

Users can pin the same change via pnpm patchedDependencies:

# pnpm-workspace.yaml
patchedDependencies:
  'deepseek-ivideo@0.1.0': patches/deepseek-ivideo-0.1.0.patch

中文摘要(快速阅读)

deepseek-ivideo 0.1.0 在 Windows 上打开即崩:VideoRuntimeManager 把 fileURLToPath(new URL(...)) 得到的原生路径 C:\... 直接传给 node --import,而 Node 的 ESM loader 只接受 file:// URL,于是抛 ERR_UNSUPPORTED_ESM_URL_SCHEME ('c:')。Linux/macOS 上 POSIX 绝对路径能碰巧通过,所以这是 Windows 专属 bug。修复只需把传给 --import 的路径换成 pathToFileURL(path).href(并把 ownerGuardPath 保持为 URL 对象)。已在本地以 patchedDependencies 固化,等待上游修复。

  • 环境: Windows + Node 24 + DSH 0.1.2-rc.1 + deepseek-ivideo 0.1.0
  • 复现: 打开 Video 视图模板列表 → 报错;或 node --import "C:\...\preview-owner-guard.js" 直接复现
  • 影响: Studio 模板列表/预览不可用;iiPPT/iDesign 不受影响
  • 建议: pathToFileURL(this.ownerGuardPath).href,附带一次 Windows 冒烟测试

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions