#Deno Aliases

1 messages · Page 1 of 1 (latest)

crystal tangle
#

When I run my tests I get the following example error:

error: Relative import path "@services/chain/types/chain_types.ts" not prefixed with / or ./ or ../
    at file:///workspaces/maicro/backend/test/1000.config.and.files/1000.config.test.ts:6:26

But my app runs, and deno check doesn't complain about any issues.

imports from my deno.json

  "imports": {
    "zod": "npm:zod@^3.24.1",
    "appwrite/": "npm:appwrite@^16.0.2/",
    "@services/": "./services/",
    "@common/": "./services/common/",
    "@test_tools/": "./test/test_tools/"
  }

Screen snip attached showing when I am editing in code, no errors are indicated.

The issues only start when I try to run tests that contain aliases.

Any thoughts

crystal tangle
#

Deno Aliases causing errors in tests.

I've done a bit more basic checking, using aliases in main.ts successfully. But when used in any test, that test fails with the error shown in the previous screen snip.

north anvil