That version of Node-JS is too new for Node-RED 2.1.3 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 3.1.9 or 4.0.0-beta.3