That version of Node-JS is too new for your version of Node-RED due to a security patch they did recently
Searching that error "Error: spawn EINVAL" would have lead you to:
- Not starting on window 11 "Error: spawn EINVAL" - #2 by knolleary
- Error: spawn EINVAL - #2 by GogoVega
- Estou tendo problemas para rodar o node red - #2 by jbudd
- and so on....
In short, update node-red to latest v3.* or better still, v4.0.8 and it will be resolved.