Wrong module-path shown on IntelliSense

21 views Asked by At

For reasons, I have remapped a directory on my computer:

subst a: c:\Data\A

For example, I start vscode with the path "A:\develop\Hello", which is the directory where my Javascript application is located. The require statements where the path starts with "./" are displayed correctly, e.g.

require "./myModule" 

shows when hovering:

module "A:\develop\Hello\myModule" 

If the require statement is like the following:

require "myModule"

is shows:

module "c:\Data\A\develop\Hello\myModule" 

instead.

How can I prevent this? The module path should of course always be within the project directory. Like in the first version. (The first version can only be used as an alternative at the top level.)

Version: 1.87.0 (user setup)
Commit: 019f4d1419fbc8219a181fab7892ebccf7ee29a2
Date: 2024-02-27T23:41:44.469Z
Electron: 27.3.2
ElectronBuildId: 26836302
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Windows_NT x64 10.0.19045

Update: When I execute require.resolve I get the correct paths.

0

There are 0 answers