<p dir="auto">Hey all, just learning Deno. Nice docs so far, clear, concise, consistent.</p>
<p dir="auto">Anyway, this page is a 404.</p>
<p dir="auto"><a href="https://deno.land/manual@v1.28.1/runtime/cache_api" rel="nofollow">https://deno.land/manual@v1.28.1/runtime/cache_api</a></p>
<p dir="auto">Hi Deno Team,</p>
<p dir="auto">I upgraded to Deno 1.31.2 today and found some extremely annoying behavior in deno-fresh.<br>
I report that here, since fresh did not change and the behavior appeared directly after upgrading to Deno 1.31.2.<br>
I'm working on this repo based on deno-fresh: <a href="https://github.com/codemonument/deno_audio_logbook">https://github.com/codemonument/deno_audio_logbook</a>.</p>
<h2 dir="auto">Problem</h2>
<p dir="auto">When I start the dev server by using <code class="notranslate">deno task start</code>,<br>
it works at first <strong>(*)</strong>, but when I change anything in any watched file,<br>
it seems to recompile successfully, but it can't restart the server correctly:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="deno task start
Task start doppler run -- deno run -A --cached-only --watch=static/,routes/ dev.ts
Watcher Process started.
The manifest has been generated for 5 routes and 4 islands.
loadSecrets: 462ms
initDb: 813ms
Watcher File change detected! Restarting!
loadSecrets: 828ms
initDb: 1331ms
PostCSS Transformed and Cached: /Users/bjesuiter/Develop/codemonument/deno_audio_logbook/css/global.css { fileHash: &quot;ptYaR1kyC6IFD87cIeOC6y9DmGXlAE8T6/ALXQzupNk=&quot; }
error: Uncaught AddrInUse: Address already in use (os error 48)
    const listener = Deno.listen({
                          ^
    at Object.listen (ext:deno_net/01_net.js:356:39)
    at Server.listenAndServe (https://deno.land/std@0.150.0/http/server.ts:181:27)
    at serve (https://deno.land/std@0.150.0/http/server.ts:589:20)
    at start (https://deno.land/x/fresh@1.1.4/src/server/mod.ts:70:11)
    at async file:///Users/bjesuiter/Develop/codemonument/deno_audio_logbook/main.ts:14:1
Watcher Process finished. Restarting on file change..."><pre class="notranslate"><code class="notranslate">deno task start
Task start doppler run -- deno run -A --cached-only --watch=static/,routes/ dev.ts
Watcher Process started.
The manifest has been generated for 5 routes and 4 islands.
loadSecrets: 462ms
initDb: 813ms
Watcher File change detected! Restarting!
loadSecrets: 828ms
initDb: 1331ms
PostCSS Transformed and Cached: /Users/bjesuiter/Develop/codemonument/deno_audio_logbook/css/global.css { fileHash: "ptYaR1kyC6IFD87cIeOC6y9DmGXlAE8T6/ALXQzupNk=" }
error: Uncaught AddrInUse: Address already in use (os error 48)
    const listener = Deno.listen({
                          ^
    at Object.listen (ext:deno_net/01_net.js:356:39)
    at Server.listenAndServe (https://deno.land/std@0.150.0/http/server.ts:181:27)
    at serve (https://deno.land/std@0.150.0/http/server.ts:589:20)
    at start (https://deno.land/x/fresh@1.1.4/src/server/mod.ts:70:11)
    at async file:///Users/bjesuiter/Develop/codemonument/deno_audio_logbook/main.ts:14:1
Watcher Process finished. Restarting on file change...
</code></pre></div>
<p dir="auto"><strong>(*)</strong> - after restarting VSCode, simply starting the server has the same problem.<br>
I can resolve it though by manually killing all deno instances running on my system and restarting vscode.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="deno task start
Task start doppler run -- deno run -A --cached-only --watch=static/,routes/ dev.ts
Watcher Process started.
The manifest has been generated for 5 routes and 4 islands.
loadSecrets: 462ms
initDb: 813ms
PostCSS Transformed and Cached: /Users/bjesuiter/Develop/codemonument/deno_audio_logbook/css/global.css { fileHash: &quot;ptYaR1kyC6IFD87cIeOC6y9DmGXlAE8T6/ALXQzupNk=&quot; }
error: Uncaught AddrInUse: Address already in use (os error 48)
    const listener = Deno.listen({
                          ^
    at Object.listen (ext:deno_net/01_net.js:356:39)
    at Server.listenAndServe (https://deno.land/std@0.150.0/http/server.ts:181:27)
    at serve (https://deno.land/std@0.150.0/http/server.ts:589:20)
    at start (https://deno.land/x/fresh@1.1.4/src/server/mod.ts:70:11)
    at async file:///Users/bjesuiter/Develop/codemonument/deno_audio_logbook/main.ts:14:1
Watcher Process finished. Restarting on file change..."><pre class="notranslate"><code class="notranslate">deno task start
Task start doppler run -- deno run -A --cached-only --watch=static/,routes/ dev.ts
Watcher Process started.
The manifest has been generated for 5 routes and 4 islands.
loadSecrets: 462ms
initDb: 813ms
PostCSS Transformed and Cached: /Users/bjesuiter/Develop/codemonument/deno_audio_logbook/css/global.css { fileHash: "ptYaR1kyC6IFD87cIeOC6y9DmGXlAE8T6/ALXQzupNk=" }
error: Uncaught AddrInUse: Address already in use (os error 48)
    const listener = Deno.listen({
                          ^
    at Object.listen (ext:deno_net/01_net.js:356:39)
    at Server.listenAndServe (https://deno.land/std@0.150.0/http/server.ts:181:27)
    at serve (https://deno.land/std@0.150.0/http/server.ts:589:20)
    at start (https://deno.land/x/fresh@1.1.4/src/server/mod.ts:70:11)
    at async file:///Users/bjesuiter/Develop/codemonument/deno_audio_logbook/main.ts:14:1
Watcher Process finished. Restarting on file change...
</code></pre></div>