question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Visiting a webapp with syntax error

See original GitHub issue

Bug report

Describe the bug

Dual syntax error when visiting app from server with a compilation error:

error - ./pages/index.js:56:4
Syntax error: Unexpected token, expected "jsxTagEnd"
  54 |         </button>
  55 |       </div
> 56 |     </main>
     |     ^
  57 |   )
  58 | }
  59 | 
Error: Syntax error: Unexpected token, expected "jsxTagEnd"
  54 |         </button>
  55 |       </div
> 56 |     </main>
     |     ^
  57 |   )
  58 | }
  59 | 
    at getBabelError (/Users/joe/Documents/Development/Work/zeit/next.js/packages/next/dist/build/webpack/plugins/wellknown-errors-plugin/parseBabel.js:4:91)
    at getModuleBuildError (/Users/joe/Documents/Development/Work/zeit/next.js/packages/next/dist/build/webpack/plugins/wellknown-errors-plugin/webpackModuleError.js:1:2469)
    at /Users/joe/Documents/Development/Work/zeit/next.js/packages/next/dist/build/webpack/plugins/wellknown-errors-plugin/index.js:1:549
    at Array.map (<anonymous>)
    at /Users/joe/Documents/Development/Work/zeit/next.js/packages/next/dist/build/webpack/plugins/wellknown-errors-plugin/index.js:1:478
    at SyncHook.eval [as call] (eval at create (/Users/joe/Documents/Development/Work/zeit/next.js/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:1)
    at SyncHook.lazyCompileHook (/Users/joe/Documents/Development/Work/zeit/next.js/node_modules/tapable/lib/Hook.js:154:20)
    at Compilation.seal (/Users/joe/Documents/Development/Work/zeit/next.js/node_modules/webpack/lib/Compilation.js:1284:19)
    at /Users/joe/Documents/Development/Work/zeit/next.js/node_modules/webpack/lib/Compiler.js:675:18
    at /Users/joe/Documents/Development/Work/zeit/next.js/node_modules/webpack/lib/Compilation.js:1261:4
event - compiled successfully

To Reproduce

  1. Create a syntax error.
  2. Start dev server.
  3. Visit page URL.
  4. Observe error in the terminal

Expected behavior

Only once:

error - ./pages/index.js:56:4
Syntax error: Unexpected token, expected "jsxTagEnd"
  54 |         </button>
  55 |       </div
> 56 |     </main>
     |     ^
  57 |   )
  58 | }
  59 | 

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mayank-budhirajacommented, Apr 13, 2021

@jvincent-dev this issue seems to be resolved already

0reactions
balazsorban44commented, Jan 27, 2022

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Syntax error while executing a python script to make a web ...
i am fairly new to advanced programing and i was trying to create an executable link for my program but im getting a...
Read more >
Python Web App using "asyncio" not starting, has "invalid ...
After deploying the applications, it refuses to start with an "invalid syntax" error within the standard "asyncio" library. This happens with ...
Read more >
Where is the error? : Forums - PythonAnywhere
You should update the file # appropriately for the web framework you're using, and then # click the 'Reload /yourdomain.com/' button on the...
Read more >
Debugging HTML - Learn web development | MDN
Syntax errors : These are spelling or punctuation errors in your code that actually cause the program not to run, like the Rust...
Read more >
How To Handle Errors in a Flask Application - DigitalOcean
You might misspell a variable, misuse a for loop, or construct an if statement in a way that raises a Python exception, like...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found