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!
-
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
1 Answer
Reset to default 2As @Barmer mentioned, I have deleted the node_modules
and rerun npm install
, then it works well.