On some old projects running npm install with legacy peer dependencies flag helps me
npm install --legacy-peer-deps