make a babel.config.cjs file at the root and add the below as the content
module.exports = {
presets: [
[
'@babel/preset-env',
{
targets: {
node: 'current'
}
}
]
]
};
Trust me it works as magic!
Please upvote if it helped :)