AliceFox
AliceFox
DDeno
Created by AliceFox on 1/30/2025 in #help
Moving code to src/ caused VSCode errors about imports
Hi. I just started a new project, and at first I had all my code in root workspace directory, together with deno.json. I had subdirectories also, but the main files were at the top. Everything worked just fine. Now I decided to move all code to src directory and it caused errors like this popping up in VSCode:
Relative import path "drizzle-orm/pglite" not prefixed with / or ./ or ../
hint: If you want to use a JSR or npm package, try running `deno add jsr:drizzle-orm/pglite` or `deno add npm:drizzle-orm/pglite`deno(import-prefix-missing)
Relative import path "drizzle-orm/pglite" not prefixed with / or ./ or ../
hint: If you want to use a JSR or npm package, try running `deno add jsr:drizzle-orm/pglite` or `deno add npm:drizzle-orm/pglite`deno(import-prefix-missing)
Now this errors is from src/db/index.ts. When I move it back to db/index.ts, it doesn't complain. Deno runs it just fine anyway, it's just the VSCode part that seems to not get it.
4 replies