Uncaught TypeError: Cannot read property 'apply' of undefined on new install
Bug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Versions.
@angular/cli: 1.0.0 node: 6.9.5 os: darwin x64 @angular/common: 4.0.3 @angular/compiler: 4.0.3 @angular/core: 4.0.3 @angular/forms: 4.0.3 @angular/http: 4.0.3 @angular/platform-browser: 4.0.3 @angular/platform-browser-dynamic: 4.0.3 @angular/router: 4.0.3 @angular/cli: 1.0.0 @angular/compiler-cli: 4.0.3
Repro steps.
npm install -g @angular/cli ng new projectname cd projectname ng serve --> Browse to localhost:4200 in Chrome
The log given by the failure.
When you first open the browser you get the following message: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
Then the error 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)
Desired functionality.
Bug fix or the ability to work out why it's not actually working, i've cleaned the NPM cache, reinstalled with -g and still get an error.
Mention any other details that might be useful.
Same Problem here.
yeah.. have to downgrade to [email protected] fix this problem it's issue with [email protected].
Same Problem here.
Downgrading to [email protected] works
Issues tracked here https://github.com/angular/zone.js/issues/746 and https://github.com/angular/zone.js/issues/747
uninstall zone.js and reinstall zone.js using npm will upgrade it to 0.8.8 instead of 0.8.4 so angular/cli 1.0.0 is pointing to wrong version
@laiseng the caret (^) is here to automatically pick safe upgrades in a semver way. Just remove the caret if you want to stick this dependency to a specific version.
I have "zone.js": "^0.8.5" but problem still persists.
I have "zone.js": "^0.8.5" but problem still persists.
remove the caret, and rm -rf node_modules && rm yarn.lock && yarn
Remove caret (^) and downgrade to 0.8.4. This works for me.
"zone.js": "0.8.4"
You have to restart your server after downgrade to [email protected] .
[email protected] is working fine with @angular/*@4.0.3.
Thanks.
Same here, with [email protected] the problem disappeared, thanks
With [email protected] the problem disappeared, thanks
same error, change the zone.js@^0.8.8 to [email protected] can solve the problem, thanks
Perfect! Back from children duties now. Quick fix is that if you just 'npm install [email protected]' in the root of the application created by the CLI it fixes the issue :)
Well done tracking that one down @all.
With [email protected] the problem disappeared, thanks
@iainplimmer No. It is just suppressed. :joy:
Change "zone.js":"^0.8.5" to "zone.js":"0.8.5" the problem disappeared, thanks
Same Problem here.
same aswell