SyntaxError: Unexpected token '.'

This is because you are trying to use optional chaining (?.) with node 12 or lower.

Thats’s not possible.

To use optional chaining you should use node 14 or higher.