title: npm isn't working in powershell giving error but works fine in hyper terminal
body: <p>I was a react native project but it throws error everytime. I tried to add pakages to my node project earlier it throws the same error always. I've tried to update it. but It's hopeless.</p>
  <pre><code>PS C:\Users\sarth\Desktop\app&gt; npm i -g react-app
  C:\Users\sarth\AppData\Roaming\npm\node_modules\npm\lib\utils\replace-info.js:13
      result += cleanUrl(str.slice(index, match.index)) + match[0]
                ^
  
  TypeError: cleanUrl is not a function
      at splitAndReplace (C:\Users\sarth\AppData\Roaming\npm\node_modules\npm\lib\utils\replace-info.js:13:15)
      at replaceInfo (C:\Users\sarth\AppData\Roaming\npm\node_modules\npm\lib\utils\replace-info.js:23:12)
      at process.exitHandler (C:\Users\sarth\AppData\Roaming\npm\node_modules\npm\lib\utils\exit-handler.js:168:26)
      at process.emit (node:events:520:28)
      at process._fatalException (node:internal/process/execution:164:25)
  </code></pre>
  <p>This error always persist when I'm using terminal like powershell and command prompt. But it work fine on a downloaded terminal called Hyper which is truly doesn't make any sense.
  Any help will be appreciated. Thanks in advance</p>