-
Notifications
You must be signed in to change notification settings - Fork 28.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ts-jest aliases does not work: Cannot find module '@/server'.ts(2307) but code compiles normally #94474
Comments
In the test file, run If so, can you please share a complete minimal project that demonstrates this issue? |
Effect of @mjbvz I created a repository example-vscode-error |
Thanks. This helped me understand the problem. The issue is that the test file is not considered part of the "include": ["src/**/*.ts"], so only files under |
@mjbvz I understand that you do not consider it as a bug, however your answer is not helpful and may be misleading for other people- adding test directory to include is workaround, not a solution. There is no reason to compile dozens of test files just to make IDE not throwing errors. |
If you want that
VS Code itself is library agnostics so are not going to special case how we handle ts files that look like they might be jest tests |
0ba0ca5
x64
Steps to Reproduce:
Cannot find module <file> (2307)
for every file using moduleMappingsExample:
jest.config.js:
part of the test file:
every line using '@' or '@@' has a red underline and error message
tsconfig.json:
Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered: