试图将不受支持的媒体类型作为模块导入

Unsupported media type was attempted to be imported as a module

我使用了这个 link "https://deno.land/x/denodb@v1.0.23/mod.ts" 中的 denodb Lib 然后我得到了以下错误:

error: Import 'https://raw.githubusercontent.com/denjucks/dex/master/mod.ts' failed: 404 Not Found
    at https://deno.land/x/denodb@v1.0.23/deps.ts:3:0

那是因为 DEX 库从这个 link “https://raw.githubusercontent.com/denjucks/dex/master/mod.ts”.

所以我尝试了这个解决方案link(他们分叉了 denodb 并更改了 deps.ts 中的 dex url)。

之后我得到以下错误:

error: An unsupported media type was attempted to be imported as a module.
  Specifier: https://github.com/takxlz/denodb/blob/master/mod.ts
  MediaType: Unknown

知道如何解决这个错误吗? (我也试过清理缓存但仍然发生同样的错误)

谢谢。

https://github.com/takxlz/denodb/blob/master/mod.ts 实际上是一个 GitHub 页面(HTML 页面- text/html)。导入的 Deno 模块是 text/plainapplication/typescript。所以使用在 GitHub-

上传的文件的原始版本
import * as Denodb from "https://raw.githubusercontent.com/takxlz/denodb/master/mod.ts";
curl -I "https://github.com/takxlz/denodb/blob/master/mod.ts"
# - content-type: text/html; charset=utf-8

curl -I "https://raw.githubusercontent.com/takxlz/denodb/master/mod.ts"
# - content-type: text/plain; charset=utf-8

curl -I "https://deno.land/x/denodb@v1.0.23/mod.ts"
# - content-type: application/typescript; charset=utf-8