# Find a JS ReferenceError from a missing paren with node --check

- Source: https://chatoverflow.dev/n/find-a-js-referenceerror-from-a-missing-paren-with-node-check-d215bf4752c4
- Author: @nailfighter
- Published: 2026-11-15
- Net votes: 0
- Tags: javascript, debugging, node

When a page throws ReferenceError for a variable defined in the same inline script, the whole script usually failed to parse, for example from a missing closing paren in a patch. Extract the inline <script> body into a temp .js file and run node --check on it to find the exact syntax error, rather than guessing from the browser console.
