Issue 1:
Both me and another discord user both get

Failed to request to tsserver Error: Debug Failure. False expression: Containing file should be a module.

when trying to use workers.

This seems to happen when running the manual example

but also in other cases. (see the code after the error stacktrace)

This is my stacktrace of the error. I assume it is the same for them

Starting Deno language server...
version: 1.12.2 (release, x86_64-unknown-linux-gnu)
executable: /home/skyler/.deno/bin/deno
Connected to "Visual Studio Code" 1.58.2
language server initialized
Enabling import suggestions for: https://deno.land
Enabling import suggestions for: https://crux.land
Server ready.
Failed to request to tsserver Error: Debug Failure. False expression: Containing file should be a module.
at checkImportMetaProperty (deno:cli/tsc/00_typescript.js:72534:22)
at checkMetaProperty (deno:cli/tsc/00_typescript.js:72509:24)
at checkExpressionWorker (deno:cli/tsc/00_typescript.js:74908:28)
at checkExpression (deno:cli/tsc/00_typescript.js:74799:38)
at checkNonNullExpression (deno:cli/tsc/00_typescript.js:69770:37)
at checkPropertyAccessExpression (deno:cli/tsc/00_typescript.js:69815:85)
at checkExpressionWorker (deno:cli/tsc/00_typescript.js:74879:28)
at checkExpression (deno:cli/tsc/00_typescript.js:74799:38)
at checkExpressionWithContextualType (deno:cli/tsc/00_typescript.js:74446:28)
at getSignatureApplicabilityError (deno:cli/tsc/00_typescript.js:70940:35)
[Error - 11:20:27 AM] Request textDocument/semanticTokens/full failed.
Message: Invalid request
Code: -32600

worker.js

const globalCache = new Map();
onmessage = messageHandler;

function set(cacheName, key, value) {
const cache = globalCache.get(cacheName);
if (!cache) globalCache.set(cacheName, new Map());
globalCache.get(cacheName).set(key, value);
}

function get(cacheName, key) {
return globalCache.get(cacheName)?.get(key);
}

function deleteKey(cacheName, key) {
return globalCache.get(cacheName)?.delete(key);
}

function deleteCache(cacheName) {
return globalCache.delete(cacheName);
}

function messageHandler(message, sab) {
const data = message.data;
switch (data.cmd) {
case "set":
set(data.args[0], data.args[1], data.args[2]);
break;
case "get":
get(data.args[0], data.args[1]);
break;
case "delete":
deleteKey(data.args[0], data.args[1]);
break;
case "delete_cache":
deleteCache(data.args);
break;
}
postMessage(data.id);
}

mod.ts

interface Message {
cmd: "set" | "get" | "delete" | "delete_cache";
id: number;
args: [string, string, unknown] | [string, string] | string;
}

const worker = new Worker(new URL("./worker.js", import.meta.url), {type: "module"});

function set() {}

Issue 2:
Thought this was already fixed in #8914?

Using latest deno canary and actual vscode-deno.

Adding a export {} to the file helps.

Actual Result

Starting Deno language server...
version: 1.8.0+04740af (release, x86_64-unknown-linux-gnu)
Connected to "Visual Studio Code" 1.53.1
language server initialized
Server ready.
ERROR TSLS = Error: Debug Failure. False expression: Containing file should be a module.
at checkImportMetaProperty (deno:cli/tsc/00_typescript.js:70604:22)
at checkMetaProperty (deno:cli/tsc/00_typescript.js:70579:24)
at checkExpressionWorker (deno:cli/tsc/00_typescript.js:72940:28)
at checkExpression (deno:cli/tsc/00_typescript.js:72831:38)
at checkNonNullExpression (deno:cli/tsc/00_typescript.js:67851:37)
at checkPropertyAccessExpression (deno:cli/tsc/00_typescript.js:67896:85)
at checkExpressionWorker (deno:cli/tsc/00_typescript.js:72911:28)
at checkExpression (deno:cli/tsc/00_typescript.js:72831:38)
at checkExpressionWithContextualType (deno:cli/tsc/00_typescript.js:72478:28)
at getSignatureApplicabilityError (deno:cli/tsc/00_typescript.js:69000:35)
ERROR TSLS = Error: Debug Failure. False expression: Containing file should be a module.
at checkImportMetaProperty (deno:cli/tsc/00_typescript.js:70604:22)
at checkMetaProperty (deno:cli/tsc/00_typescript.js:70579:24)
at checkExpressionWorker (deno:cli/tsc/00_typescript.js:72940:28)
at checkExpression (deno:cli/tsc/00_typescript.js:72831:38)
at checkNonNullExpression (deno:cli/tsc/00_typescript.js:67851:37)
at checkPropertyAccessExpression (deno:cli/tsc/00_typescript.js:67896:85)
at checkExpressionWorker (deno:cli/tsc/00_typescript.js:72911:28)
at checkExpression (deno:cli/tsc/00_typescript.js:72831:38)
at checkExpressionWithContextualType (deno:cli/tsc/00_typescript.js:72478:28)
at getSignatureApplicabilityError (deno:cli/tsc/00_typescript.js:69000:35)
ERROR TSLS = Error: Debug Failure. False expression: Containing file should be a module.
at checkImportMetaProperty (deno:cli/tsc/00_typescript.js:70604:22)
at checkMetaProperty (deno:cli/tsc/00_typescript.js:70579:24)
at checkExpressionWorker (deno:cli/tsc/00_typescript.js:72940:28)
at checkExpression (deno:cli/tsc/00_typescript.js:72831:38)
at checkNonNullExpression (deno:cli/tsc/00_typescript.js:67851:37)
at checkPropertyAccessExpression (deno:cli/tsc/00_typescript.js:67896:85)
at checkExpressionWorker (deno:cli/tsc/00_typescript.js:72911:28)
at checkExpression (deno:cli/tsc/00_typescript.js:72831:38)
at checkExpressionWithContextualType (deno:cli/tsc/00_typescript.js:72478:28)
at getSignatureApplicabilityError (deno:cli/tsc/00_typescript.js:69000:35)

Expected Result

File will be formatted.