#Is it possible to compile a project using `Deno.connectTlsalpnProtocols` (unstable API)?

11 messages · Page 1 of 1 (latest)

echo terrace
#

error: Module not found
^ This is the error I get when I try to run my compiled program. Not sure if the unstable API is the issue or something else.

echo terrace
#

I thought it might have been an issue with importing an npm package but I just finished refactoring it into my app. Issue still persists.

echo terrace
#

I think I know that the problem is. Unfortunately I'm not able to get actionable data as to why there's a module missing but I did get a tiny bit of "aha!" when deploying my Deno project yesterday.

#

The import map is the issue. Rather, anything that starts with a forward slash.

#

So, the compiled app, for whatever reason, thinks you want to access the filesystem at large and not the modules within the app.

#

AHA! I was right

#

So, here's my import_map.json:

{
  "imports": {
    "/": "./",
    "./": "./",
    "std/": "https://deno.land/std@0.166.0/"
  }
}
#

I was importing something from std/ like:

import { Buffer } from "std/node/internal/buffer.mjs";
#

Once I replaced that with

import { Buffer } from "https://deno.land/std@0.166.0/node/internal/buffer.mjs";

my issues disappeared and now my compiled app works