Unhandled Promise rejection: Cannot assign to a reference or variable! ; Zone: <root> ; Task: Promise.then ; Value: Error: Cannot assign to a reference or variable!


#1

Please!
Someone can help me?
I am a beginner in ionic 3 and I started to learn with a project I’m working on right now.
Since this morning, I opened my project and I block on this message of error for which I do not understand abolutely nothing.
In this error message it says “polyfills.js”, yet I did not touch anything.

And when I do " ionic serve --l " it only displays a blank page with nothing as information.


#2

Might be a little late for you, but anyway…
These errors typically come from angulars template engine. It could mean that a variable assignment in some *ng-statement isn’t possible, or that you have duplicate names in your html-tag:

Don’t

<textarea id="message"  name="message"  [(ngModel)]="message">

Do

<textarea id="message"  name="message"  [(ngModel)]="SOME_OTHER_VAR_NAME">