I am running an older version of NodeJS (v0.12.6) from August 2015. NodeJS has jumped to version v5.1.0 in 5 months.
I am feeling brave and I decided to upgrade my NodeJS by running these commands.
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
Then I updated my node modules.
sudo npm install npm@latest -g
Now to re ran my NodeJS service. Dang I received this error.
Error: Module version mismatch. Expected 47, got 14.
at Error (native)
at Object.Module._extensions..node (module.js:450:18)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at bindings (/redactedpath/node_modules/bcrypt/node_modules/bindings/bindings.js:76:44)
at Object. (/redactedpath/node_modules/bcrypt/bcrypt.js:3:35)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
I did things a bit out of order and I think I needed to power up the MoPi/Pi from batteries (and no mains power) for 2iC to detect. But all is god, I can power up and shutdown my Pi from 6xAA batteries.
sudo sh installWittyPi.sh
Everything installed for me.
sudo shutdown -r now
On reboot I noticed warning on boot up about GPIO pin conflicts with my MoPi. Maybe the MoPi and Witty Pi are clashing? I changed GP17 on the Witty Pi and rebooted. I still had a conflict so I set GP4 on the Witty Pi to also be custom. After a reboot I still had MoPi warning.
Do’h, I just realised that the Pi is powered by Mains USB on the pi and the MoPi warning may just be a warning about the MoPi not controlling the external power. I removed the mains power ad instead connected up the MoPi to a 9v DC supply.
I reset the Witty Pi pins to their defaults and powered up the Pi via the Pi MoPI power button. All MoPi warnings have gone. Now to resume the WittyPi setup.
I will possibly use the MoPi to power down the Pi when battery gets low and use the Witty Pi to boot up the Pi every day and to use the Realtime clock.
tip: Make sure the folder you install witty pi to is spelled exactly like “%HOME%/wittyPi” and not “%HOME%/WittyPi”. My daemons would not start because it way looking for “/home/pi/wittyPi” and not “/home/pi/WittyPi”.
Now I configured the Witty Pi’s time.
34. SD Card Check
Ok run the following command to get the location of your boot filesystem
Now run this command to check your boot disk (replace the boot disk with the one identified above).
fsck -fy /dev/mmcblk0p5
You may notice potential corrupted files and fixes from the output above.