-
Notifications
You must be signed in to change notification settings - Fork 12.8k
VSCode ignore paths defined in tsconfig.json #20285
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
Comments
@atiris Can you please try this again in VS Code 1.19 insiders which includes the latest TS version |
@atiris if you run |
What is the secret sauce to get paths to work? I have tried both on insiders version and regular version of vscode but paths are not getting resolved. ng serve is picking up the paths, so I know tsconfig.json is proper. |
Anyone figured this one out? I would like to use paths, but without VSCode support - this is not possible |
@kotpal if you are running into issues please file a new ticket, and give us some context about what you are trying to do and what you are seeing. |
Created #21473 |
Same problem. I think VS just doen't support it. |
@skorunka Have you tried closing VSC and reopening it after changing @mhegazy I've tried reproducing the issue based on your GIF in #21473 (comment) to no avail. Irrespective of how I modify |
@ComFreek I have the same issue and restarting VSC or running reload window does not work. |
This works for me: 🔧 Move (or repeat) |
@pablorsk odd, but that works! Thanks!! I already had it in tsconfig.json so I just repeated it in tsconfig.app.json and all is well! |
@bluecaret Do you have an example of what worked for you. I tried it in both tsconfig.json and tsconfig.app.json and Intellisense is still telling me it can't find my module tsconfig.app.js
tsconfig.json
The code compiles correctly so it is just a problem with intellisense not recognizing it. I running Version 1.24.1 |
@pdemilly here is my setup. Might also help to close and reopen VSC after applying the change to and waiting a couple minutes for it to fully load up and do its checks. Its also possible your wildcards might not work for it (completely guessing here)? tsconfig.json
tsconfig.app.json
|
@pablorsk, I have the same issue. CLI picks up the "paths" from tsconfig.app.json but VS Code doesn't. I tried both the solutions provided; meaning
None of the above worked for me. VS Code
TS Compiler
My tsconfig.json (after moving paths):
|
same problem - however I have @mjbvz @babak1199 since this is closed, maybe we should open a new issue? |
yes please. |
From @atiris on November 22, 2017 15:43
(1 theme extensions excluded)
Steps to Reproduce:
tsconfig.json
, add:index.ts
intosrc/app/com
directory with content:export * from './com.component';
app.module.ts
, replace:import { ComComponent } from './com/com.component';
with
import { ComComponent } from '@c';
ng build
- result: everything is okbut
'@c'
is underlined and listed in PROBLEMS tab as:[ts] Cannot find module '@c'. (6, 30)
app.module.ts
:import { ModModule } from '@a/mod/mod.module';
imports: [ ... ModModule ... ]
[ts] Cannot find module '@a/mod/mod.module (7,27)
first error is gone, '@c' is not underlined anymore.
So, direct paths to exact place (@c),
and also paths to parent directory (@m/*)
are not evaluated correctly from tsconfig.json file.
Reproduces without extensions: Yes
Copied from original issue: microsoft/vscode#38968
The text was updated successfully, but these errors were encountered: