最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Nuxt: SyntaxError Unexpected token { - Stack Overflow

programmeradmin2浏览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!

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.

发布评论

评论列表(0)

  1. 暂无评论