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.
[email protected] install /usr/local/src/NodeBB/node_modules/ws
(node-gyp rebuild 2> builderror.log) || (exit 0)
There's no problem in your post. Taken from stack overflow.
I don't see any errors here. (node-gyp rebuild 2> builderror.log) || (exit 0) is just the command which gets executed.
node-gyp rebuild is the actual command.
2>: Here 2 is stderr, > redirects stderr to the file builderror.log. In simpler words, error is written to builderror.log.
|| means "or". If (node-gyp rebuild 2> builderror.log) generates an error, exit code will be truthy (not 0). If the node-gyp rebuild command doesn't generate an error, the left hand side of the "or" statement will be falsy (0), and (exit 0) gets executed.
(exit 0): 0 is the status code for success.