I tried using following command too,
ng add @ng-bootstrap/ng-bootstrap -- force
It didnt worked, so i deleted both node_modules and package-lock.json files. I reinstalled it using following command.
npm install --legacy-peer-deps
Still i am having the same problem. Anyone have an idea?