-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
Needs More InfoThe issue still hasn't been fully clarifiedThe issue still hasn't been fully clarifiedVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue
Description
From @atiris on November 22, 2017 15:43
- VSCode Version: Code 1.17.2 (b813d12980308015bcd2b3a2f6efa5c810c33ba5, 2017-10-16T13:57:00.652Z)
- OS Version: Linux x64 4.13.11-200.fc26.x86_64
- Extensions:
| Extension | Author (truncated) | Version |
|---|---|---|
| ng-template | Ang | 0.1.7 |
| vscode-markdownlint | Dav | 0.11.1 |
| EditorConfig | Edi | 0.11.1 |
| beautify | Hoo | 1.1.1 |
| material-icon-theme | PKi | 3.0.0 |
| vscode-docker | Pet | 0.0.22 |
| ActiveFileInStatusBar | Ros | 1.0.3 |
| code-settings-sync | Sha | 2.8.6 |
| html-snippets | abu | 0.1.0 |
| path-intellisense | chr | 1.4.2 |
| githistory | don | 0.2.3 |
| gitlens | eam | 5.7.1 |
| tslint | eg2 | 1.0.14 |
| prettier-vscode | esb | 0.26.0 |
| php-debug | fel | 1.12.1 |
| php-intellisense | fel | 2.0.1 |
| code-runner | for | 0.8.4 |
| vscode-auto-open-markdown-preview | hnw | 0.0.4 |
| rest-client | hum | 0.16.1 |
| angular2-switcher | inf | 0.1.4 |
| docthis | joe | 0.6.0 |
| angular-essentials | joh | 0.3.2 |
| Angular2 | joh | 2.11.2 |
| vscode-codemetrics | kis | 1.11.1 |
| ecdc | mit | 0.11.0 |
| azure-account | ms- | 0.1.3 |
| PowerShell | ms- | 1.5.1 |
| debugger-for-chrome | msj | 3.5.0 |
| angular2-inline | nat | 0.0.17 |
| typescript-hero | rbb | 1.7.0 |
| vscode-statusbar-json-path | ric | 1.0.7 |
| autoimport | ste | 1.5.3 |
| colonize | vms | 2.2.2 |
| vscode-todo-highlight | way | 0.5.11 |
| local-history | xyz | 1.6.1 |
(1 theme extensions excluded)
Steps to Reproduce:
- ng new path
- cd path
- code . --disable-extensions
- ng g m mod
- ng g c com
- ng g c mod/moa
- ng g c mod/mob
- edit
tsconfig.json, add:
"baseUrl": "src/",
"paths": {
"@a/*": ["app/*"],
"@m/*": ["app/mod/*"],
"@c": ["app/com/"]
}- add
index.tsintosrc/app/comdirectory with content:
export * from './com.component'; - edit
app.module.ts, replace:
import { ComComponent } from './com/com.component';
with
import { ComComponent } from '@c'; - build project:
ng build- result: everything is ok
but'@c'is underlined and listed in PROBLEMS tab as:
[ts] Cannot find module '@c'. (6, 30) - import ModModule, add this into
app.module.ts:
import { ModModule } from '@a/mod/mod.module';
imports: [ ... ModModule ... ] - ng build is again OK, vscode shows new problem in PROBLEMS tab:
[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
adrian-moisa, Yugloocamai, TAGC, chivorotkiv, pablorsk and 2 more
Metadata
Metadata
Assignees
Labels
Needs More InfoThe issue still hasn't been fully clarifiedThe issue still hasn't been fully clarifiedVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue