Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Unexpected token export when deploying a MERN app to digitalocean
I’m trying to deploy a MERN app to a digital ocean droplet. I have used nodemon and concurrently to run my app through “npm run dev”. Everything works fine when running in my local machine, but when I git clone the project to the droplet and try to npm run dev to run the app on the remote server, I get:
SyntaxError: Unexpected token export
I even removed the middleware where the error happens and tried to run again, but the error happened somewhere else in my code. I’ve stuck in this since yesterday. Do you have any idea?