title: updating node and npm from npm 6 to 8 and node 14 to 16 or 18 on a react native project , fails on ENOENT
body: <p>Getting an error after running npm install,</p>
  <p>It seems that npm is not pathed right for this file or something is cached?</p>
  <p>I'm using homebrew and nvm to switch between versions, but the only version that works is node 14 and npm 6.</p>
  <p>Need to install the following packages:
  pod@0.9.0
  Ok to proceed? (y) y</p>
  <pre><code>npm ERR! syscall chmod
  npm ERR! path /Users/me/.npm/_npx/a0ca5f5666585aa2/node_modules/pod/node_modules/pm2/bin/pm2
  npm ERR! errno -2
  npm ERR! enoent ENOENT: no such file or directory, chmod '/Users/me/.npm/_npx/a0ca5f5666585aa2/node_modules/pod/node_modules/pm2/bin/pm2'
  npm ERR! enoent This is related to npm not being able to find a file.
  npm ERR! enoent 
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /Users/me/.npm/_logs/2022-08-04T19_23_48_147Z-debug-0.log
  npm ERR! code 254
  npm ERR! path /Users/me/repos/MyApp/MyMobileApp
  npm ERR! command failed
  npm ERR! command sh /var/folders/d2/rdhvx2fd24vbsfrtf3lddq9m0000gq/T/postinstall-a0c95179.sh
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /Users/me/.npm/_logs/2022-08-04T19_23_45_192Z-debug-0.log
  
  </code></pre>