Npm ERR! code ELOCKVERIFY

That is not used any more I don't think, Use the script from here.

If instead you want to try to fix the problem then run

cd .node-red
rm -rf node_modules
rm -f package-lock.json
npm install