ultra icon indicating copy to clipboard operation
ultra copied to clipboard

Relative import path is not resolved on Windows

Open stevefan1999-personal opened this issue 2 years ago • 0 comments

Symptoms

There is an annoying error message warning about relative import not in import map.

Environment

OS: Windows 11 Deno:

deno 1.22.2 (release, x86_64-pc-windows-msvc)
v8 10.3.174.6
typescript 4.6.2

ultra version: master branch

Reproduction

  1. Clone the example create-ultra-app repo
  2. Change all references of deno/x to github master
  3. Get the error when visiting any other path

Error log:

TypeError: Relative import path "src/api" not prefixed with / or ./ or ../ and not in import map from "https://raw.githubusercontent.com/exhibitionist-digital/ultra/master/src/server/requestHandler.ts"
    at async importAPIRoute (https://raw.githubusercontent.com/exhibitionist-digital/ultra/master/src/server/requestHandler.ts:120:17)
    at async Server.requestHandler (https://raw.githubusercontent.com/exhibitionist-digital/ultra/master/src/server/requestHandler.ts:124:25)
    at async Server.#respond (https://deno.land/[email protected]/http/server.ts:298:18)

The API still renders however

stevefan1999-personal avatar Jun 08 '22 11:06 stevefan1999-personal