<p dir="auto">Receiving errors in vscode from the Deno Language Server</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&lt;--- Last few GCs ---&gt;

[77365:0x7fe610008000]   156574 ms: Scavenge (reduce) 1397.1 (1422.7) -&gt; 1396.5 (1423.0) MB, 2.21 / 0.00 ms  (average mu = 0.145, current mu = 0.011) allocation failure; 
[77365:0x7fe610008000]   156796 ms: Mark-Compact (reduce) 1397.2 (1423.0) -&gt; 1396.3 (1423.2) MB, 218.90 / 0.00 ms  (average mu = 0.102, current mu = 0.058) allocation failure; scavenge might not succeed


&lt;--- JS stacktrace ---&gt;


#
# Fatal JavaScript out of memory: Ineffective mark-compacts near heap limit
#"><pre class="notranslate"><code class="notranslate">&lt;--- Last few GCs ---&gt;

[77365:0x7fe610008000]   156574 ms: Scavenge (reduce) 1397.1 (1422.7) -&gt; 1396.5 (1423.0) MB, 2.21 / 0.00 ms  (average mu = 0.145, current mu = 0.011) allocation failure; 
[77365:0x7fe610008000]   156796 ms: Mark-Compact (reduce) 1397.2 (1423.0) -&gt; 1396.3 (1423.2) MB, 218.90 / 0.00 ms  (average mu = 0.102, current mu = 0.058) allocation failure; scavenge might not succeed


&lt;--- JS stacktrace ---&gt;


#
# Fatal JavaScript out of memory: Ineffective mark-compacts near heap limit
#
</code></pre></div>
<p dir="auto">After investigating it seems like importing certain packages can trigger this. I am able to cause this error and stop receiving this error merely by adding or removing this package:</p>
<p dir="auto"><code class="notranslate">import * as goog from "https://esm.sh/googleapis@118.0.0";</code></p>
<p dir="auto">Hi, I need to reimport script after changes (by others) at runtime, but deno doesn't want to recompile sources.<br>
Simple test:<br>
File test.ts</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="await import(&quot;./abc.ts&quot;);

await Deno.writeTextFile(&quot;./abc.ts&quot;, &quot;console.log('After changes');&quot;);

await import(&quot;./abc.ts&quot;);"><pre class="notranslate"><span class="pl-k">await</span> <span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-s">"./abc.ts"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-k">await</span> <span class="pl-smi">Deno</span><span class="pl-kos">.</span><span class="pl-en">writeTextFile</span><span class="pl-kos">(</span><span class="pl-s">"./abc.ts"</span><span class="pl-kos">,</span> <span class="pl-s">"console.log('After changes');"</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-k">await</span> <span class="pl-k">import</span><span class="pl-kos">(</span><span class="pl-s">"./abc.ts"</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">File abc.ts</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="console.log('Before changes');"><pre class="notranslate"><span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'Before changes'</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Execute:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="deno run --unstable --allow-all test.ts"><pre class="notranslate">deno run --unstable --allow-all test.ts</pre></div>
<p dir="auto">Console output:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ubuntu@deno:~/workspace/deno$ deno run --unstable --allow-all test.ts
Compile file:///home/ubuntu/workspace/deno/test.ts
Before changes
ubuntu@deno:~/workspace/deno$ "><pre class="notranslate">ubuntu@deno:<span class="pl-k">~</span>/workspace/deno$ deno run --unstable --allow-all test.ts
Compile file:///home/ubuntu/workspace/deno/test.ts
Before changes
ubuntu@deno:<span class="pl-k">~</span>/workspace/deno$ </pre></div>
<p dir="auto">File abc.ts after run:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="console.log('After changes');"><pre class="notranslate"><span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">'After changes'</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Deno version</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="deno 1.0.2
v8 8.4.300
typescript 3.9.2"><pre class="notranslate"><code class="notranslate">deno 1.0.2
v8 8.4.300
typescript 3.9.2
</code></pre></div>
<p dir="auto">OS Linux</p>