错误代码门户
Node.jsNode.js错误代码

ERR_INVALID_URL_SCHEME

invalid url scheme

代码 ERR_INVALID_URL_SCHEME · Node.js 报告的问题。

尝试将不兼容方案(协议)的 URL 用于特定目的。它仅用于 fs 模块中的 WHATWG URL API 支持(仅接受具有“文件”方案的 URL),但将来也可能用于其他 Node.js API。

Google Translate · 此内容为自动翻译。技术术语及适用条件请以英文原文为准。

An attempt was made to use a URL of an incompatible scheme (protocol) for a specific purpose. It is only used in the WHATWG URL API support in the fs module (which only accepts URLs with 'file' scheme), but may be used in other Node.js APIs as well in the future.

故障排除与诊断链接

请先确认文档中的产品、版本及发生环境与当前情况一致。