xxxxxxxxxx
Stop your deployment server(Means your app shouldn't be running in the background on any port) and then try reinstalling. If still didnt work try clearing the cache via :
npm cache clean --force
npm install -g npm@latest --force
If u also use yarn
npm install -g yarn@latest --force
xxxxxxxxxx
npm cache clean --force
npm install -g npm@latest --force
Try to install your component once again.
xxxxxxxxxx
Stop the development server (npm run commands) and then try to install package.