Issue
I am facing a problem as posted here, and notified that the cause may be the version of nodejs.
As shown below, the node version is fine.
$node -v
v7.2.0
But it gives me an abnormal version of the root user, which is used by crontab process.
$sudo su
$node -v
v0.10.42
I've tried $n rm 0.10.42
or $n 7.2.0
many times won't fix the problem
Can someone help? I want the crontab process to use the correct version of nodejs.
Solution
I find out that I can simply add the correct which node
path to $PATH.
$which node
/usr/local/bin/node
$sudo su
$which node
/usr/bin/node
$export PATH=$PATH:/usr/local/bin
$node -v
v7.2.0
Answered By - Jacky Lau Answer Checked By - Marie Seifert (WPSolving Admin)