<p dir="auto">I use the following command to run my scripts:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="deno run --watch --allow-net --allow-env --allow-read --unstable ./src/index.ts"><pre class="notranslate">deno run --watch --allow-net --allow-env --allow-read --unstable ./src/index.ts</pre></div>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// index.ts
Deno.serve(opts, (req) =&gt; {
	return new Response()
})"><pre class="notranslate"><span class="pl-c">// index.ts</span>
<span class="pl-smi">Deno</span><span class="pl-kos">.</span><span class="pl-en">serve</span><span class="pl-kos">(</span><span class="pl-s1">opts</span><span class="pl-kos">,</span> <span class="pl-kos">(</span><span class="pl-s1">req</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
	<span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-smi">Response</span><span class="pl-kos">(</span><span class="pl-kos">)</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">Whenever I change the code in that file, I will get an error like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="error: Uncaught (in promise) AddrInUse: Address already in use (os error 48)
Watcher Process finished. Restarting on file change..."><pre class="notranslate"><code class="notranslate">error: Uncaught (in promise) AddrInUse: Address already in use (os error 48)
Watcher Process finished. Restarting on file change...
</code></pre></div>
<p dir="auto">Which does not happen for the <code class="notranslate">std/http</code> api</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Deno.serve(() =&gt; new Response(&quot;Hello, world!&quot;));"><pre class="notranslate"><span class="pl-v">Deno</span><span class="pl-kos">.</span><span class="pl-en">serve</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-k">new</span> <span class="pl-v">Response</span><span class="pl-kos">(</span><span class="pl-s">"Hello, world!"</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ deno run --allow-all --unstable --watch test.js"><pre class="notranslate"><code class="notranslate">$ deno run --allow-all --unstable --watch test.js
</code></pre></div>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Deno.serve(() =&gt; new Response(&quot;Hello, world!2&quot;)); //Save"><pre class="notranslate"><span class="pl-v">Deno</span><span class="pl-kos">.</span><span class="pl-en">serve</span><span class="pl-kos">(</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-k">new</span> <span class="pl-v">Response</span><span class="pl-kos">(</span><span class="pl-s">"Hello, world!2"</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">//Save</span></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Platform: linux x86_64
Version: 1.25.0
Args: [&quot;deno&quot;, &quot;run&quot;, &quot;--allow-all&quot;, &quot;--unstable&quot;, &quot;--watch&quot;, &quot;test.js&quot;]

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', ext/flash/lib.rs:1316:42
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace"><pre class="notranslate"><code class="notranslate">Platform: linux x86_64
Version: 1.25.0
Args: ["deno", "run", "--allow-all", "--unstable", "--watch", "test.js"]

thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', ext/flash/lib.rs:1316:42
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
</code></pre></div>