Over the weekend I was working on a project that I had started back in 2015.
Let’s just say that I had too much time on my hands. Went down a rabbit hole of automation and scale. Ended up making a ton of spaghetti code.
I had to roll out an update to enable a new payment provider.
There I was… working away on 700 lines of billing code.
Patched it up, tested it and it was working!
Pushed it to production and the service would not start.
The Daemon would just hang and not report back.
Keep in mind I wrote this beast.
I know the code base in and out, I can still remember how I had to hack together some code to “force” angular to do redirects.
I just could not figure out why the service would not start. Broke down the init script, looked at the VM machine, looked inside the logs, called a friend and lastly went to sleep.
Woke up this morning and the solution was right in front of my face.
THE FREAKING RUNTIME!
You can see from my command I was using just regular node to execute the code.
This is the latest and greatest node version v8.6.0.
I wrote this back in 2015 with node v0.11.15.
The difference is that the latest version of node is capable of running the application but for whatever reason could not fork the service and start.
I went back to the original node version when I first release this application and I was back to a working build.
Sometimes the answer is right in front of your face and for whatever reason, you don’t allow yourself to see it.
Taking a walk, a nap, or just playing some foosball with a close friend could be the key to finding the answer to all your problems.
Taking my daily siesta,
P.S. I’m going to be releasing a bunch of videos about this project over at JSecademy. If you have not yet signed up I would highly recommend you to create your account it’s 100% FREE.