Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

405
Vistas
Uncaught SyntaxError: Unexpected token '<' when loading a local JQuery file into a HTML file

I am seeing the "Uncaught SyntaxError: Unexpected token '<' " error at line 1 of my local jquery-3.6.0.min.js file upon clicking the 'Inspect' option after loading my HTML file in Chrome.

The highly unexpected thing is, when I move to "sources" on the inspect window, I can see that the jquery-3.6.0.min.js file is available. However, its contents are the same as my HTML file! I have attached pictures of examining both index.html and my local JQuery file and you can see that they have the same content.

inspecting index.html: enter image description here

inspecting jquery-3.6.0.min.js: enter image description here

Here is how I have loaded the JQuery file into HTML:

<html>
                <head>
                <title>Soren</title>
                    <script type="text/javascript" charset="UTF-8" src="./js/jquery-3.6.0.min.js"></script>
                ...

</html>

I am quite puzzled by this error because upon reading online matter, I at most expected an error 404 page to show up as the JQuery file if there were problems loading it, but the last thing I expected was the JQuery file to contain the parent HTML file's content.

Another point to note is that I am launching the HTML file via a server in python such as:

class MyServer(BaseHTTPRequestHandler):

    def do_GET(self):
        """ do_GET() can be tested using curl command
            'curl http://server-ip-address:port'
        """
        file = codecs.open("/home/pi/Burger/index.html", "r", "utf-8")
        html = file.read()

        temp = os.popen("/opt/vc/bin/vcgencmd measure_temp").read()
        self.do_HEAD()
        status = ''
        self.wfile.write(html.format(temp[5:], status).encode("utf-8"))

if __name__ == '__main__':
    print("Online now")
    http_server = HTTPServer((host_name, host_port), MyServer)
    print("Server Starts - %s:%s" % (host_name, host_port))

Any help will be greatly appreciated! Thanks in advance.

Abhinandan

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda