Heroku has great documentation for that: https://devcenter.heroku.com/articles/getting-started-with-nodejs
How can I solve this problem
[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.