angular-material-extensions / google-maps-autocomplete

Autocomplete input component and directive for google-maps built with angular and material design |
https://angular-material-extensions.github.io/google-maps-autocomplete
MIT License
169 stars 60 forks source link

Not working with Angular 12.1.1 giving error on installation #321

Closed praveenmaurya91 closed 5 months ago

praveenmaurya91 commented 3 years ago

Bug Report or Feature Request (mark with an x)

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

OS and Version?

Versions

Repro steps

The log given by the failure

Desired functionality

Mention any other details that might be useful

AnthonyNahas commented 3 years ago

can you post the error logs?

I am using the library with v12 and there is zero problems...

lchanouha commented 3 years ago

not sure if we are on the same case here, but there is a remaining ref to @schematics/angular/utility/json-utils - private API - in the project:



$ ng add @angular-material-extensions/google-maps-autocomplete
An unhandled exception occurred: Cannot find module '@schematics/angular/utility/json-utils'
Require stack:
- ./node_modules/@angular-material-extensions/google-maps-autocomplete/schematics/helpers/angular/json-utils.js
- ./node_modules/@angular-material-extensions/google-maps-autocomplete/schematics/helpers/angular/index.js
`
Louis
dfborba commented 3 years ago

I`m facing this same issue to install with ng add.. Angular version: 12.2.2

bkr32 commented 3 years ago

@AnthonyNahas perhaps this could be of some help

npm ERR! Found: @angular/common@12.2.4
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"^12.1.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^9.1.0 || ^10.0.0" from @agm/core@3.0.0-beta.0
npm ERR! node_modules/@agm/core
npm ERR!   peer @agm/core@"^3.0.0-beta.0" from @angular-material-extensions/google-maps-autocomplete@6.2.2
npm ERR!   node_modules/@angular-material-extensions/google-maps-autocomplete
npm ERR!     @angular-material-extensions/google-maps-autocomplete@"*" from the root project
ScratZa commented 3 years ago

Similar issue with 12.2.4

bkr32 commented 3 years ago

AGM is pretty deprecated, it doesn't seem like the team wants to continue on with it, would be better to migrate to https://www.npmjs.com/package/@angular/google-maps

LeLunZ commented 2 years ago

@AnthonyNahas it seems like a private api was used here

json-utils was probably changed.

Everything under /utils is considered as private API and therefore can be changed or removed without warning in any version.

As mentioned this could be used instead: https://www.npmjs.com/package/jsonc-parser

installation can be forced with npm install -f @angular-material-extensions/google-maps-autocomplete