deno
deno copied to clipboard
Deno is unable to reference imported typescript files without extension
Version: Deno 2.0.0
I am running my nest js project, in which when i try to run main.ts file it gave me this error:
error: Module not found "file:///D:/Github/ps-renderer-2.0/src/app.module". Maybe add a '.ts' extension or run with --unstable-sloppy-imports at file:///D:/Github/ps-renderer-2.0/src/main.ts:2:27
indicating that it didnt resolved the file imported by main.ts
The solution is suggested in the error message: pass --unstable-sloppy-imports flags and it should work.
oh sorry, i was passing this parameter but after that file. now i get this: error: Relative import path "@modules/pattern-size/pattern-size.module" not prefixed with / or ./ or ../ now in even in deno2 i need to create an import map to fix this issue?
Could you share some more info about your project? Is there a repo i could take a look?
Closing this the OP did not respond. @MrSharpp please re-open this PR if you can provide a full reproduction.