最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

javascript - Nuxt: SyntaxError Unexpected token { - Stack Overflow

matteradmin6PV0评论

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!

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!

Share Improve this question asked Apr 22, 2020 at 7:51 user11081925user11081925 4
  • thats an syntax error.. I guess you have an { somewhere too much – Ilijanovic 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. – user11081925 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. – Barmar Commented Apr 22, 2020 at 8:08
  • can you please give us your page and its layout and also your nuxt.config.js code? – Ali Hosseini Commented Apr 22, 2020 at 8:17
Add a ment  | 

1 Answer 1

Reset to default 2

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

Post a comment

comment list (0)

  1. No comments so far