Yes, installing node js is safe. Make sure you download node js software from nodejs.org website or authentic vendor repository only.