@sdetweil, i just kinda kept trying random things, including your script and I think I made things worse. I did try to update node and npm, but something is really out of whack.
The error I keep seeing over and over again is
npm WARN npm npm does not support Node.js v10.24.0
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
when I run “node -v”, i see v19.8.1, so I have no idea where 10.24.0 is coming from. I am close to just nuking my pi and starting from scratch.