As Node 12 LTS is reaching End of Life, in this article we will discuss the most common issues you might have after the upgrade and the options you have to resolve them.

As you know, in Node apps, sometimes there may be Promises which might be rejected, but the rejections are never caught.

node promise

Previously if that happened we saw the following warning message on the console:

promise rejection node

In Node JS 15 and above versions the default behavior has been changed. Now instead of getting a warning message, the process will crash with the following error:

node js 15 crash

If you are still on NodeJS 12 LTS or 14 LTS versions, it’s recommended that you upgrade to the latest LTS version (currently v16). If you see  UnhandledPromiseRejectionWarning messages in your logs, then there is a chance that your Node app will crash after the upgrade. We  suggest 3 ways to handle these types of issues in the newest version of NodeJS:

  1. Find and properly handle all the unhandled promise rejections in the code:

promise rejection handling node

Achieving this in real world applications might be time consuming. In our opinion, this option should be gradually implemented over the long run.

  1. Add global listener for unhandled promise rejections:

unhandled promise rejection node

Despite the fact that this option will resolve the process termination issue, the recommendation is to use this as a midterm solution. Logging all the unhandled promises will provide a full picture. This information can then be used later on to properly handle all the remaining unhandled rejections.

  1. Change the behavior to act similar to pre-15 versions, when starting the node process:

         a. node --unhandled-rejections=warn index.js

         b. NODE_OPTIONS=--unhandled-rejections=warn node index.js

This option is the fastest to use as it changes only the command we are using for starting the node app.

—--

At Insightful, we use Node JS for our backend. We have microservices architecture powered by Moleculer Framework and Kubernetes acts as a container orchestrator. 

We also recently decided to upgrade the NodeJS version. We were still on v12 and its support was ending in April 2022. So we decided to go with the 3rd option: adding --unhandled-rejections=warn flag as an interim solution, until we completely resolve the unhandled rejections.

This approach required changes to the Dockerfile and the Kubernetes Deployment files, as follows:

Dockerfile

dockerfile

Deployment yaml file

yaml file

After building the new image and deploying to Kubernetes via the config mentioned above, no application crashes have been observed.

Conclusion

To summarize: if you want to painlessly upgrade Node JS from 12 to 16, you can select one of the options mentioned in this article. Please choose your option wisely based on your use case. 

Workpuls Teramind ActivTrak Hubstaff DeskTime Time Doctor RescueTime Kickidler Veriato Work Examiner
OVERVIEW
Price $6/user/month $6/user/month $7.20/user/month $7/user/month $7/user/month $9.99/user/month $6/user/month $9.99/user/month $150/licence/year $60/licence (lifetime)
Free trial 7 days 7 days No 14 days 14 days 14 days 30 days 7 days Yes 30 days
Ease of use Very easy Difficult Very easy Easy Easy Very easy Very easy Very easy Very difficult Easy
TRACKING METHODS
Unlimited (tracker working 24/7)
Fixed (defined working hours)
Automatic (when computer is connected to a specified network)
Manual (start/stop)
Project based (track time only on projects)
GENERAL MONITORING FEATURES
Stealth mode
App and website usage
Real-time monitoring
Offline time tracking
Attendance
Activity levels
Keylogger
Geolocation
Remote desktop control
Website/activity blocking
SCREENSHOTS AND RECORDING
Screenshots
Screenshots on demand
Screen recording
PRODUCTIVITY FEATURES
Productivity trends
Websites and apps labeling
Category labeling
Productivity alerts
ADVANCED SECURITY FEATURES
User behavior analytics
Data loss prevention
Advanced file and web monitoring
REPORTING
Productivity reports
Team reports
Timelines
Email reports
Access management
PLATFORMS
Web
Mac desktop app
Windows desktop app
Linux desktop app
Mobile app iOS, Android iOS, Android iOS, Android iOS, Android iOS, Android Android
Browser extension Chrome Chrome Chrome
Other Citrix, VMware Chrome OS
OTHER
Support Phone, email, online Phone, email, online Phone, email, online Email, online Phone, email, online, in-person Online Phone, email, online Email, online, Viber, Whatsapp Phone, email, online, support ticket Phone, email, online
Knowledge base
Video tutorials
Integrations comming soon
API
Deployment cloud, on-premise cloud, on-premise, AWS, Azure cloud cloud cloud cloud cloud on-premise cloud, on-premise on-premise
Kronos Humanity Timeclockplus Tsheets Wheniwork Deputy Replicon Jibble EbilityTimeTracker OnTheClock BeeBole
OVERVIEW
Price(per month)Available upon requestFrom $2 per userAvailable upon requestFrom $6.40 per user+$16Free for up to 75 usersFrom $2.50 per userBasic plan:$30 for 5 users+$5 per additional userFrom $1.50 per employeeFrom $4 per user+$8From $2.20 per user$5.99 per user per month
Free trial30 days14 daysYes14 days14 days14 days30 days30 days,no credit card required
Ease of useDifficultEasyDifficultVery easyEasyEasyDifficultVery easyEasyEasyEasy
FEATURES
Timecard management
Scheduling
Shift Trading
Timesheets
Break time management
Real-time tracking
PTO Management
Payroll
Invoicing
Client billing
GPS tracking
Clock out reminders
Alerts
Manual time
PUNCH-IN METHODS
Web app
Mobile app
Time clock device
Time clock kiosk
Facial recognition
Fingerprint scanning
Geofencing
Group punch-in
REPORTING
Visual reports
Email reports
Time rounding
MANAGEMENT
Permissions
Manager approvals
Add time for others
Integrations
PLATFORMS
Web
Android app
iOS app
Mac desktop app
Windows desktop app
Linux desktop app
OTHER
SupportPhone and onlinePhone and onlinePhone,chat and onlinePhone and chatEmail and onlineChat and phonePhone,email,chat and onlinePhone and onlinePhone,email,chat and onlinePhone and onlineOnline chat and video support in English,French,and Spanish
Knowledge base
Video tutorials
Community forum
API
Workpuls Hubstaff Toggl TimeDoctor Harvest TimeCamp Timely Everhour Tick TMetric
OVERVIEW
Price (per month) $6 per user $5.83 per user $9 per user $9.99 per user $10.80 per user $5.25 per user $99 for 5 users $7 per user $19 for 10 projects $5 per user
Free trial 7 days 14 days 30 days 14 days 30 days Yes 14 days 14 days 30 days 30 days
Ease of use Very easy Difficult Difficult Very easy Easy Very easy Easy Difficult Very easy Difficult
TIME TRACKING METHODS
Manual
Start/stop buttons
Automatic time mapping
IN-DEPTH TASK AND PROJECT ANALYSIS
Screenshots
App and website usage
Activity levels coming soon
Real-time tracking
TASK AND PROJECT MANAGEMENT
Project adding
Project templates
Project status
Task assignment
Task priorities
Budgeting coming soon
Mark billable/non-billable hours
Payroll calculation
Invoicing
ALERTS
Idle time reminders
Deadline alerts coming soon
Budget alerts coming soon
REPORTING
Client login
Productivity analysis
Email reports coming soon
PLATFORMS
Web
Mac desktop app
Windows desktop app
Linux desktop app coming soon
iOS app Beta
Android app
Browser extension Chrome Chrome, Firefox Chrome Chrome Chrome, Firefox Chrome Chrome, Firefox, Opera, Edge
OTHER
Support Phone and online Email and online Email and online Online Online, email and phone Email, online and support ticket Email and chat Email and chat Email Chat
Knowledge base
Video tutorials
Integrations coming soon
API
On-premise hosting
We’ve reserved a 7-day free trial for you….

Want your hybrid or remote team to be more productive?

Claim your free 7-Day full feature trial of Insightful today. Insightful’s actionable work insights make your team more productive, efficient and accountable.

Ready to Take Full Control Of Your Workplace?

Try the simplest solution today…

Start Free Trial