title: Uncaught SyntaxError: Unexpected token ‘{’ at Cloudflare Workers JS
body: <p>I really need help. Iʼm working on a project on Cloudflare Workers, Iʼve been using Workers for a long time, but this is the first time Iʼve run into a serious problem. When I was going to save and deploy my Workers a warning popped up “Uncaught SyntaxError: Unexpected token ‘{’ at worker.js:107:248 (Code: 10021)” , and it prevented me from saving it. This is the line of code where my error is:</p>
  <pre><code>function setClass(selectedClass){const classButtons = document.querySelectorAll('.class'); classButtons.forEach((button) =&gt; {if (button.classList.contains('active')) {button.classList.remove('active');}}) let activeClass = document.querySelector(`.class-${selectedClass}`); activeClass.classList.add('active');}
  </code></pre>
  <p>at</p>
  <pre><code>document.querySelector(`.class-${selectedClass}`)
  </code></pre>
  <p>Curly brackets or braces ({) or grave accent or backtick (`), I donʼt know. I donʼt understand, because on my website it works very well. Please help me, itʼs been 3 days I canʼt solve the problem.</p>