Accepted answer
npm install --legacy-peer-deps


# force cleaning npm cache. you may have a broken package there
npm cache clean --force 

# clone repository into newly created directory (guaranteed to be clean)
git clone somedir

# switch to the new directory
cd somedir

# remove broken node_modules
rm -rf node_modules

# remove (possibly) broken package-lock
rm package-lock.json

# fresh dependency install
npm install

Related Query

More Query from same tag