zingZ
Deno12mo ago
zing

Relative import path "oak/router" not prefixed with / or ./ or ../ and not in import map

I get the above message when attempting to deploy to Deno Deploy via github actions. The same does not occur when running locally with
deno run -A src/main.ts
.

deploy.yaml:

      # ...
      - name: Upload to Deno Deploy
        uses: denoland/deployctl@v1
        with:
          project: "<proj name>"
          entrypoint: "./src/main.ts"
          root: ""
          import-map: "./deno.json"


deno.json:

  // ...
  "imports": {
    "@std/assert": "jsr:@std/assert@1",
    "@std/dotenv": "jsr:@std/dotenv",
    "@std/path": "jsr:@std/path",
    "@types/pg": "npm:@types/pg@^8.11.10",
    "drizzle-kit": "npm:drizzle-kit@^0.30.1",
    "drizzle-orm": "npm:drizzle-orm@^0.38.3",
    "oak": "jsr:@oak/oak@17.0.0",
    "dotenv": "https://deno.land/x/dotenv@v3.2.2/mod.ts",
    "deno-postgres": "https://deno.land/x/postgres@v0.19.3/mod.ts",
    "joi": "npm:joi@17.13.3",
    "pg": "npm:pg@^8.13.1"
  }


src/main.ts

import { Router } from "oak/router";
// ...


I know what the error means and I've fixed it before in other cases. From what I can see my configuration is correct, so I'm trying to figure out why I might be getting it only in the action execution. Could anyone lend an eye? thanks
Was this page helpful?