Skip to content

Conversation

@MaNongJSZ
Copy link

移除 dev 脚本中通过命令行传递的 --onSuccess 参数,避免在 Windows 系统上
因路径格式问题导致 ERR_UNSUPPORTED_ESM_URL_SCHEME 错误。

🤖 Generated with Claude Code

mofr and others added 2 commits October 10, 2025 19:15
移除 dev 脚本中通过命令行传递的 --onSuccess 参数,避免在 Windows 系统上
因路径格式问题导致 ERR_UNSUPPORTED_ESM_URL_SCHEME 错误。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
在 Windows 上,ESM 的 import() 函数需要 file:// URL 格式,而不是绝对路径。
使用 pathToFileURL 将 package.json 的绝对路径转换为正确的 URL 格式。

这修复了运行 `node dist/index.js` 时出现的 ERR_UNSUPPORTED_ESM_URL_SCHEME 错误。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant