Error AtlasError Documentation and Resolution

JavaScript string literal contains an unescaped line break

SyntaxError: string literal contains an unescaped line break

JavaScript encountered a string literal that spans lines without proper escaping or template literal syntax.

SyntaxError: string literal contains an unescaped line breaksyntax
SyntaxError: string literal contains an unescaped line break
  • A quoted string runs onto the next line without proper escaping.
  • A multiline value was written using normal quotes instead of a template literal.
  • Copy-pasted content inserted a raw newline into a string literal.
  1. Close the string before the newline or escape the line break correctly.
  2. Use template literals for multiline strings.
  3. Check generated source or pasted content for accidental newlines inside quotes.
MDN: SyntaxError: string literal contains an unescaped line break
JavaScript string literal contains an unescaped line break | Error Atlas