Error cause by Node version too old

When you want to run your node.js application and found some weird error. May be because your version of node.js was update to higher version of node.js in your old project. Here how to fix it.

If you have got any error as shown in below screenshot, may be because the issues with your version of node.js

or

error:0308010C:digital envelope routines::unsupported

You can fix by using Node Version Manager (nvm)

If you using macOS, the you can run below code in terminal before running your node.js application

export NODE_OPTIONS=--openssl-legacy-provider

Happy coding!