nandhabalan marimuthu
nandhabalan marimuthu

Reputation: 11

Trouble installing @angular/google-maps on angular13

when I tried installing it shows

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"~13.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^14.0.0 || ^15.0.0" from @angular/[email protected]
npm ERR! node_modules/@angular/google-maps
npm ERR!   @angular/google-maps@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!

even if I use --force or --legacy-peer-deps

I get an error while importing it in app.module.ts

Upvotes: 0

Views: 2558

Answers (1)

NickDotCom
NickDotCom

Reputation: 189

You have to install an older version of the google-maps package since it requires at least angular 14. The last version that supported angular 13 was 13.3.9. You can install it like this:

 npm i @angular/[email protected]

Upvotes: 2

Related Questions