When I run make run
in the mattermost/server
directory, this is what I see:
[components] TypeError: The "code" argument must be of type number. Received an instance of Error
[components] at process.set [as exitCode] (node:internal/bootstrap/node:123:9)
[components] at process.exit (node:internal/process/per_thread:187:24)
[components] at process.close (/home/user/mattermost/webapp/node_modules/rollup/dist/shared/watch-cli.js:505:23)
[components] at processTicksAndRejections (node:internal/process/task_queues:95:5)
[components] npm ERR! Lifecycle script `run` failed with error:
[components] npm ERR! Error: command failed
[components] npm ERR! in workspace: @mattermost/components@9.2.0
[components] npm ERR! at location: /home/user/mattermost/webapp/platform/components
[components] npm run run --workspace=platform/components exited with code 1
--> Sending SIGTERM to other processes..
[webapp] npm run run --workspace=channels exited with code SIGTERM
--> Sending SIGTERM to other processes..
[types] npm run run --workspace=platform/types exited with code SIGTERM
--> Sending SIGTERM to other processes..
[client] npm run run --workspace=platform/client exited with code SIGTERM
make[1]: *** [Makefile:22: run] Error 1
make[1]: Leaving directory '/home/user/mattermost/webapp'
make: *** [Makefile:598: run-client] Error 2
It seems that I’ve ran into a similar issue to this one. The function I have in node_modules/rollup/dist/shared/watch-cli.js
looks like so:
async function close(code) {
process$2.removeListener('uncaughtException', close);
// removing a non-existent listener is a no-op
process$2.stdin.removeListener('end', close);
if (watcher)
await watcher.close();
if (configWatcher)
configWatcher.close();
if (code) {
process$2.exit(code);
}
}
I am not sure where would I put the console.error(code)
function so that I can see what the error is? I tried putting it and re-running make run
but it looks like the statement isn’t picked up since I don’t see anything different in the console to tell me what’s going on.