Try
npm cache clean --force
It is used to clear the npm cache, which is an area where npm stores previously downloaded packages to reuse them later and speed up installations. Sometimes this cache can become corrupted or contain incomplete packages, which can cause crashes, infinite loops, or installation failures.