Node app - SyntaxError: Unexpected token

I was facing the same issue and after trying different approaches, the one that worked for me was using mongoose version 7.6.3

So in your server, run the command: npm i mongoose@7.6.3
It worked for me. Hopefully, it does for you too :slight_smile:

4 Likes