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

235
Vistas
Type error:annot read properties of null (reading 'width')

I have a problem with the read properties, I don't know why this is throwing an error, earlier it was working fine, please see this here is some code where it is showing an error

      const ClarifaiFace=data.outputs[0].data.regions[0].region_info.bounding_box;
      const image = document.getElementById("inputimage");
      const width = Number (image.width);
      const height= Number (image.height);
       console.log(width, height);
       return {
         leftCol:ClarifaiFace.left_Col * width,
         topRow:ClarifaiFace.top_Row * height,
         rightCol: width - (ClarifaiFace.right_Col * width),
         bottomRow: height-(ClarifaiFace.bottom_Row * height)
         

       }
   };

Error:

Type error:annot read properties of null (reading 'width')

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

It seems there is no such element with id inputimage. That's why image variable is null and therefore you are getting the error about reading property of null.

about 4 years ago · Juan Pablo Isaza Denunciar

0

What worked for me when I got this error was changing "inputimage" to "inputImage" on getElementById in the 'image' variable. Hope this helps!

about 4 years ago · Juan Pablo Isaza Denunciar
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