【发布时间】:2020-06-05 19:42:19
【问题描述】:
尝试在我的以下服务器上运行简单的 Deno Js OAK 中间件服务器时出现错误:
Ubuntu 18.04,
Deno 1.0.4,
v8 8.4.300,
typescript 3.9.2
通过运行deno run index.js 或运行deno run -A index.js
$ deno run index.js
Compile file:///home/some/tst/index.js
error: Uncaught AssertionError: Unexpected skip of the emit.
at Object.assert ($deno$/util.ts:33:11)
at compile ($deno$/compiler.ts:1170:7)
at tsCompilerOnMessage ($deno$/compiler.ts:1338:22)
at workerMessageRecvCallback ($deno$/runtime_worker.ts:72:33)
at file:///home/some/dcode/tst/__anonymous__:1:1
这是我的 index.js 文件代码:
import { Application } from "https://deno.land/x/oak/mod.ts";
const app = new Application();
app.use((ctx) => {
ctx.response.body = "Hello World!";
});
await app.listen({ port: 8000 });
【问题讨论】:
-
仅供参考:Deno 已经使用了
deno标签,创建denojs并没有添加任何内容。 -
谢谢@NikitaMadeev 我已经检查过了。
标签: javascript deno oak