I'm running into the exact same issue as yourself, is there an update on how this can be fixed?
It is dangerous to run nodebb this way. Do so at your own risk.
I'm not sure exactly what is causing that npm error, but it's not a NodeBB bug. I suggest you look it up yourself.
use_port is no longer used, just don't put the port number in the url field and set up a reverse proxy (https://docs.nodebb.org/configuring/proxies/nginx/)
Does the url property in config.json match the address used to access the site?
I just used the plugin image upload, but the image can't show how to fix it?