Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Cannot redefine property #707

Closed
florea-g opened this issue Mar 31, 2017 · 8 comments
Closed

Cannot redefine property #707

florea-g opened this issue Mar 31, 2017 · 8 comments

Comments

@florea-g
Copy link

Hello,
After i upgraded to angular 4.0.0 i have this error in console: "Cannot redefine property ...".
I have a ASP.NET website with some pages in Angular2 but the property which throws the error is from a .cshtml file. Is a function in a .js file which i am calling from more .cshtml files.

Thanks.

@JiaLiPassion
Copy link
Collaborator

JiaLiPassion commented Mar 31, 2017

@florea-g, please post the full error console,and if if there is stacktrace,please also paste here,thanks

@florea-g
Copy link
Author

florea-g commented Apr 3, 2017

Hello @JiaLiPassion
Here is the error:

Uncaught TypeError: Cannot redefine property: onAttachmentsDataBound
    at Function.defineProperty (<anonymous>)
    at patchProperty (zone.js:1235)
    at patchOnProperties (zone.js:1246)
    at propertyDescriptorPatch (zone.js:1795)
    at zone.js:1951
    at NO_ZONE.name (zone.js:11)
    at zone.js:12

Thanks

JiaLiPassion added a commit to JiaLiPassion/zone.js that referenced this issue Apr 3, 2017
@JiaLiPassion
Copy link
Collaborator

@florea-g , could you check the attached dist.zip fix your issue or not? just override the node_modules/zone.js/dist
dist.zip

JiaLiPassion added a commit to JiaLiPassion/zone.js that referenced this issue Apr 3, 2017
@florea-g
Copy link
Author

florea-g commented Apr 4, 2017

@JiaLiPassion yes that solved the issue. Thank you !

@IevhenIkonnykov
Copy link

Hello,
After updating to Angular 4 from Angular 2.4.3 I get an error when the app loads:

zone.js:1235 Uncaught TypeError: Cannot redefine property: oneAdWritePosition
at Function.defineProperty (<anonymous>)
at patchProperty (zone.js:1235)
at patchOnProperties (zone.js:1246)
at propertyDescriptorPatch (zone.js:1795)
at zone.js:1951
at webpackJsonp.677.NO_ZONE.name (zone.js:9)
at Object.<anonymous> (zone.js:12)
at Object.677 (zone.js:2067)
at __webpack_require__ (bootstrap 7590312…:52)
at Object.226 (polyfills.ts:1)
at __webpack_require__ (bootstrap 7590312…:52)
at Object.678 (zone.js:2067)
at __webpack_require__ (bootstrap 7590312…:52)
at webpackJsonpCallback (bootstrap 7590312…:23)
at polyfills.bundle.js:1

The app works fine, but I am not sure if it is right to ignore this error. Could someone please help me with this issue?

Thanks.

@JiaLiPassion
Copy link
Collaborator

@IevhenIkonnykov , could you check this dist.zip solve your issue or not?
https://github.com/angular/zone.js/files/890973/dist.zip

@IevhenIkonnykov
Copy link

Yes, it works.
Thank you so much.

Is it a solution for all similar "Cannot redefine property..." problems or just for this one particular?

Thanks again.

@JiaLiPassion
Copy link
Collaborator

@IevhenIkonnykov , thanks for confirm, it should resolve all such kind of "Cannot redefine property..." issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants