In addition to using the npm install --save --legacy-peer-deps command line option, this can also be set more permanently as a config option:
npm config set legacy-peer-deps true.
If above approach does not work try removing the node_modules folder and package-lock.json file and run command npm install.