google-maps-autocomplete
google-maps-autocomplete copied to clipboard
Not working with Angular 12.1.1 giving error on installation
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
can you post the error logs?
I am using the library with v12 and there is zero problems...
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
I`m facing this same issue to install with ng add.. Angular version: 12.2.2
@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
Similar issue with 12.2.4
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
@AnthonyNahas it seems like a private api was used here
json-utils was probably changed.
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