0

When I was trying to open my Nuxt project in browser, I got the following error SyntaxError Unexpected token {. But I have found nothing wrong with the wrong information as shown in the following picture. Have anyone run into the same problem? Thanks a lot for your answers! enter image description here

4
  • thats an syntax error.. I guess you have an { somewhere too much Commented Apr 22, 2020 at 7:55
  • @Ifaruki The error code in the node_modules/vue-server-renderer/build.dev.js. It's a third party module which Nuxt depends on, not my own code. Commented Apr 22, 2020 at 8:00
  • Try reinstalling it, maybe the file got corrupted. But if this isn't your code, then your question is off-topic here. We're here to help you fix your code, not third party code. Commented Apr 22, 2020 at 8:08
  • can you please give us your page and its layout and also your nuxt.config.js code? Commented Apr 22, 2020 at 8:17

1 Answer 1

2

As @Barmer mentioned, I have deleted the node_modules and rerun npm install, then it works well.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.