preboot / angular-webpack

A complete, yet simple, starter for Angular v2+ using webpack
MIT License
1.29k stars 561 forks source link

Cannot read property 'apply' of undefined #337

Closed GaryB432 closed 6 years ago

GaryB432 commented 7 years ago

Hello enthusiasts!

I cloned the repo on Windows 10, ran npm install && npm run start:hmr and got this in the developer tools console.

[HMR] Waiting for update signal from WDS...
Angular is running in the development mode. Call enableProdMode() to enable the production mode.
Hello Home

Uncaught TypeError: Cannot read property 'apply' of undefined
  at XMLHttpRequest.desc.get [as ontimeout] (eval at 464 (polyfills.js:1419), <anonymous>:1265:40)
  at XHRLocalObject.AbstractXHRObject._cleanup (eval at 116 (polyfills.js:828), <anonymous>:149:15)
  at XMLHttpRequest.xhr.onreadystatechange (eval at 116 (polyfills.js:828), <anonymous>:125:14)
  at XMLHttpRequest.wrapFn (eval at 464 (polyfills.js:1419), <anonymous>:1230:39)
  at ZoneDelegate.invokeTask (eval at 464 (polyfills.js:1419), <anonymous>:398:31)
  at Zone.runTask (eval at 464 (polyfills.js:1419), <anonymous>:165:47)
  at XMLHttpRequest.ZoneTask.invoke (eval at 464 (polyfills.js:1419), <anonymous>:460:38)
Foxandxss commented 7 years ago

Welp, perhaps I need to update the dependencies. Let me check.

Foxandxss commented 7 years ago

Weird, same OS, doesn't fail to me

TFM-LSW commented 7 years ago

Hi there Jesús, I get the same OSX 10.10.5.

I think zone.js has been updated. I held the version at 0.8.5 and NOT ^0.8.5 and it works as should.

Great work BTW really helpful.

Foxandxss commented 7 years ago

Ohhhhhhhhh yes, you are right. It is that issue.

giscafer commented 7 years ago
zone.js?fad3:1265 Uncaught TypeError: Cannot read property 'apply' of undefined
    at XMLHttpRequest.desc.get [as ontimeout] (eval at 462 (polyfills.js:763), <anonymous>:1265:40)
    at XHRLocalObject.AbstractXHRObject._cleanup (eval at 115 (polyfills.js:186), <anonymous>:149:15)
    at XMLHttpRequest.xhr.onreadystatechange (eval at 115 (polyfills.js:186), <anonymous>:125:14)
    at XMLHttpRequest.wrapFn (eval at 462 (polyfills.js:763), <anonymous>:1230:39)
    at ZoneDelegate.invokeTask (eval at 462 (polyfills.js:763), <anonymous>:398:31)
    at Zone.runTask (eval at 462 (polyfills.js:763), <anonymous>:165:47)
    at XMLHttpRequest.ZoneTask.invoke (eval at 462 (polyfills.js:763), <anonymous>:460:38)
GaryB432 commented 7 years ago

Locking down zone.js indeed seems to do the trick. I'll leave this open in case Jesús wants to do something further but I am moving on. Thanks for the great work.

TFM-LSW commented 7 years ago

zoneJS 0.8.9 fixes this issue