google-maps-autocomplete icon indicating copy to clipboard operation
google-maps-autocomplete copied to clipboard

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

Open vbukhari-twn opened this issue 11 months ago • 1 comments

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.

vbukhari-twn avatar Jan 03 '25 21:01 vbukhari-twn

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

ganySA avatar Jan 23 '25 12:01 ganySA