oakserver / oak

A middleware framework for handling HTTP with Deno, Node, Bun and Cloudflare Workers 🐿️ 🦕
https://oakserver.org
MIT License
5.17k stars 235 forks source link

Oak import causes a compiled app to hang #648

Open jackfiszr opened 7 months ago

jackfiszr commented 7 months ago

Easiest way to reproduce:

Create deps.ts with:

import { Application } from "jsr:@oak/oak@14.2.0";
console.log(Application);

run deno compile deps.ts run ./deps The binary will hang forever and not reach the console log. This was tested on Ubuntu 22.04 and Windows 10, Deno 1.41.3 and 1.42.0. The affected Oak versions are: I guess every one on JSR but only 14.2.0 on deno.land/x

Edit: The same happens when I do for example import { walk } from "@std/fs/walk" instead of just import { walk } from "@std/fs" - works with deno run but not when compiled, so probably a deno compile issue.

kitsonk commented 7 months ago

As you point out, it is likely something to do with Deno compile. I assume you have opened an issue with Deno?