hello, I have a strange problem with both VSCode and VS 2022:
TSC compiles the output correctly but both the IDEs give me an intellisense error in module resolution and with different error codes.
With this tsconfig.json
"module": "AMD",
"moduleResolution": "Node",
"paths": { "@app-root/*": [ "./app/*" ] },
This import, located in the file app/XXX/file.ts
import { SERVER_MODULE } from "@app-root/server.module";
TSC (5.4.4) Compiles (correctly) to:
define("XXX/file", ["require", "exports", "server.module"], function (...
But VsCode show the error:
Cannot find module '@app-root/server.module' or its corresponding type declarations.ts(2307)
And Visual Studio 2022 (17.11.5) shows a different error:
TS2792 (TS) Cannot find module '@app-root/server.module'. Did you mean to set the 'moduleResolution' option to 'nodenext', or to add aliases to the 'paths' option?
If importing with the relative path, no error is shown in the IDE and the output is the same
import { SERVER_MODULE } from "../server.module";
Does anybody have a clue about what I'm doing wrong?