Description
Type: Bug
After installing @azure/msal-angular and successfully building the project, VS Code incorrectly underlines the import with a red error Cannot find module '@azure/msal-angular' or its corresponding type declarations.
The package is correctly installed in node_modules. It appears in package.json as a dependency. The Angular app compiles and builds with ng serve or ng build with no errors
This issue only affects the IDE (VS Code) experience.
steps to reproduce
create angular 20 app using angular cli
add import in app-routing.module.ts
import { MsalModule } from '@azure/msal-angular';
it works in other projects fine so this is very interesting to me why this is happening.
Angular CLI: 20.0.3
Angular: 20.0.4
Node: 24.2.0
NPM: 11.3.0
OS: Windows 10 x64
TypeScript: 5.8.3
@azure/msal-angular: ^3.0.0
@azure/msal-browser: ^3.0.0
VS Code version: Code 1.101.0 (dfaf44141ea9deb3b4096f7cd6d24e00c147a4b1, 2025-06-11T15:00:50.123Z)
OS version: Windows_NT x64 10.0.26100
Modes:
System Info
Item | Value |
---|---|
CPUs | 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz (8 x 1498) |
GPU Status | 2d_canvas: enabled canvas_oop_rasterization: enabled_on direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: disabled_off video_decode: enabled video_encode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: enabled webnn: disabled_off |
Load (avg) | undefined |
Memory (System) | 31.73GB (14.36GB free) |
Process Argv | --crash-reporter-id dd0e4312-6606-4b68-b68a-1961f553c9f4 |
Screen Reader | no |
VM | 0% |
Extensions (15)
Extension | Author (truncated) | Version |
---|---|---|
ng-template | Ang | 20.0.1 |
gitlens | eam | 17.2.0 |
prettier-vscode | esb | 11.0.0 |
vscode-ionic-snippets | fiv | 2.2.2 |
auto-rename-tag | for | 0.1.10 |
copilot | Git | 1.335.0 |
copilot-chat | Git | 0.28.0 |
go | gol | 0.46.1 |
ionic | Ion | 1.105.0 |
Angular2 | joh | 18.0.2 |
csdevkit | ms- | 1.20.35 |
csharp | ms- | 2.80.16 |
vscode-dotnet-runtime | ms- | 2.3.5 |
code-spell-checker | str | 4.0.47 |
webnative | Web | 2.0.40 |
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
vscod805cf:30301675
binariesv615:30325510
vscaat:30438848
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupytercf:31046870
pythonrstrctxt:31112756
nativeloc2:31192216
5fd0e150:31155592
dwcopilot:31170013
471b6256:31263136
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
hdaa2157:31222309
copilot_t_ci:31222730
e5gg6876:31282496
pythoneinst12:31285622
bgtreat:31268568
4gafe986:31271826
c7cif404:31314491
996jf627:31283433
pythonrdcb7cf:31303019
usemplatestapi:31297334
0aa6g176:31307128
7bj51361:31289155
747dc170:31275177
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
pylancequickfixt:31329274
he899328:31327032
d7aab740:31328298
useunpkg:31331645
1292j425:31329156
cja58720:31331066