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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With