@Dataholic Thanks for confirming. I see that you are using an older version of Function core tool version. Please uninstall and reinstall the most recent version of Function core tools runtime and that should fix this issue. Please see this: https://github.com/Azure/azure-functions-core-tools#installing
While I used the most recent version of function core tools runtime version it worked fine.
These are the versions which I am using:
❯ func --version
4.0.5198
❯ node --version
v18.16.1
So it works with newer CoreTools and v18 of Node. Hope this helps.
**
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.