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

Not working with Angular 12.1.1 giving error on installation

Open praveenmaurya91 opened this issue 3 years ago • 7 comments

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

praveenmaurya91 avatar Jul 01 '21 09:07 praveenmaurya91

can you post the error logs?

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

AnthonyNahas avatar Jul 13 '21 08:07 AnthonyNahas

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

lchanouha avatar Aug 08 '21 19:08 lchanouha

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

dfborba avatar Aug 24 '21 07:08 dfborba

@AnthonyNahas perhaps this could be of some help

npm ERR! Found: @angular/[email protected]
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/[email protected]
npm ERR! node_modules/@agm/core
npm ERR!   peer @agm/core@"^3.0.0-beta.0" from @angular-material-extensions/[email protected]
npm ERR!   node_modules/@angular-material-extensions/google-maps-autocomplete
npm ERR!     @angular-material-extensions/google-maps-autocomplete@"*" from the root project

bkr32 avatar Sep 02 '21 06:09 bkr32

Similar issue with 12.2.4

ScratZa avatar Sep 06 '21 20:09 ScratZa

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

bkr32 avatar Sep 07 '21 07:09 bkr32

@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

LeLunZ avatar Feb 17 '22 13:02 LeLunZ