Skip to content

VSCode doesn't support leading slash imports #72093

@matthew-dean

Description

@matthew-dean

Issue Type: Bug

This commit added support for leading-slash module resolution.
microsoft/TypeScript#27980

However, even though TypeScript / tsc will handle it fine, VSCode will mark leading slash imports with the error "cannot find module". In addition, typing a / slash will show Intellisense / autocomplete for the system root instead of the tsconfig mapped root.

VS Code version: Code 1.32.3 (a3db5be, 2019-03-14T22:46:48.547Z)
OS version: Darwin x64 17.7.0

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz (12 x 2600)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: enabled
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 16.00GB (1.99GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (16)
Extension Author (truncated) Version
npm-intellisense chr 1.3.0
bracket-pair-colorizer Coe 1.0.61
vscode-eslint dba 1.8.2
gitlens eam 9.5.1
vsc-material-theme Equ 2.8.2
vscode-sort hen 0.2.5
JSDocTagComplete Hoo 0.0.2
nearley kar 1.0.3
vscode-lebab mrm 2.6.0
cpptools ms- 0.22.1
vetur oct 0.18.0
material-icon-theme PKi 3.7.0
final-newline sam 0.3.2
code-settings-sync Sha 3.2.7
trailing-spaces sha 0.2.11
cmake-tools vec 1.1.3

(2 theme extensions excluded)

Metadata

Metadata

Assignees

Labels

info-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions