Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

266
Visualizações
Angular 2 - TypeError: Cannot read property 'apply' of undefined

I'm developing a very simple Angular 2 application with only one component, one service and one interface but I came across this error and after a few hours of investigating I still can't find an answer.

Uncaught TypeError: Cannot read property 'apply' of undefined
    at XMLHttpRequest.desc.get [as ontimeout] (zone.js:1265)
    at XHRLocalObject.AbstractXHRObject._cleanup (abstract-xhr.js:149)
    at XMLHttpRequest.xhr.onreadystatechange (abstract-xhr.js:125)
    at XMLHttpRequest.wrapFn (zone.js:1230)
    at ZoneDelegate.invokeTask (zone.js:398)
    at Zone.runTask (zone.js:165)
    at XMLHttpRequest.ZoneTask.invoke (zone.js:460)

I can't really understand why the error is keeps appearing, the application is still functional after the mistake appears but it's frustrating.

Any ideas?

about 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

Hi I had the same problem and I solve this downgrading to zone.js@0.8.5 and the problem disappeared. Run the following command in your project folder:

npm install zone.js@0.8.5 --save
about 4 years ago · Santiago Trujillo Relatório

0

for now you could do something like:

rimraf node_modules
npm cache clear
npm i zone.js@0.8.5
about 4 years ago · Santiago Trujillo Relatório

0

I don't know if it can help others, but in my case it was because i was adding a mouseover listener and the function of the mouseover event wasn't defined. Took me a while to find out

 b.addListener("mouseover",this.onMouseOver); //this.onMouseOver wasn't defined
about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda