Skip to content
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

Angular 19 - Doesn't compile. Could not resolve "@angular/flex-layout/flex" #337

Open
vbukhari-twn opened this issue Jan 3, 2025 · 1 comment

Comments

@vbukhari-twn
Copy link

vbukhari-twn commented Jan 3, 2025

Bug Report or Feature Request (mark with an x)

- [ x ] bug report -> please search issues before submitting
- [    ] feature request

OS and Version?

Windows 11

Versions

Angular CLI: 19.0.6
Node: 18.20.5
Package Manager: npm 10.8.2
OS: win32 x64

Package Version

@angular-devkit/architect 0.1900.6
@angular-devkit/build-angular 19.0.6
@angular-devkit/core 19.0.6
@angular-devkit/schematics 19.0.6
@angular/cdk 19.0.4
@angular/cli 19.0.6
@angular/google-maps 19.0.4
@angular/material 19.0.4
@schematics/angular 19.0.6
rxjs 7.8.1
typescript 5.6.3
zone.js 0.15.0

@angular-material-extensions/google-maps-autocomplete 16.4.0

Repro steps

Installed all dependencies per instructions except '@angular/flex-layout'
Add code to app.module.ts
Doesn't Compile (see log below)

The log given by the failure

[ERROR] Could not resolve "@angular/flex-layout/flex"

node_modules/@angular-material-extensions/google-maps-autocomplete/fesm2022/angular-material-extensions-google-maps-autocomplete.mjs:13:20:
  13 │ import * as i3 from '@angular/flex-layout/flex';
     ╵                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~

You can mark the path "@angular/flex-layout/flex" as external to exclude it from the bundle, which
will remove this error and leave the unresolved path in the bundle.

X [ERROR] Could not resolve "@angular/flex-layout"

node_modules/@angular-material-extensions/google-maps-autocomplete/fesm2022/angular-material-extensions-google-maps-autocomplete.mjs:16:33:
  16 │ import { FlexLayoutModule } from '@angular/flex-layout';
     ╵                                  ~~~~~~~~~~~~~~~~~~~~~~

You can mark the path "@angular/flex-layout" as external to exclude it from the bundle, which will
remove this error and leave the unresolved path in the bundle.

Desired functionality

Compile without any error.

Mention any other details that might be useful

I have recently upgraded to Angular 19 and updated all dependency to latest version as well. I did not had @angular/flex-layout installed previously. Based on npm, @angular/flex-layout has been deprecated, therefore, I did not installed it. I do not wish to install it if it not required.

@ganySA
Copy link

ganySA commented Jan 23, 2025

Same issue - any idea when this will work with 19?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants