How to resolve “useFipsEndpoint: options.useFipsEndpoint ?? false, SyntaxError: Unexpected token ‘?’ “

Before today everything was working fine but somehow now I am getting this error:

useFipsEndpoint: options.useFipsEndpoint ?? false, SyntaxError: Unexpected token ‘?’

My current node version of the project is 12.18.3.

I tried to change the ?? to || as suggested by many posts but there are many packages which uses that and at each time the error occurs in different files.

I also tried to upgrade the Node version, but that is currently not possible. Below is one of the examples :

Debugger attached.
Waiting for the debugger to disconnect...
/Users/abc/Desktop/Projectname/modules/winston-helper/node_modules/@aws-sdk/client-s3/dist-cjs/index.js
    useFipsEndpoint: options.useFipsEndpoint ?? false;
/Users/abc/Desktop/Projectname/modules/winston-helper/node_modules/@smithy/smithy-client/dist-cjs/index.js:323
    this.input = input ?? {};
                        ^