简体   繁体   中英

Aurelia TypeError: this.sourceExpression.connect is not a function

I have encountered runtime error:

TypeError: this.sourceExpression.connect is not a function

Problem is that stacktrace does not show anything useful, it points (randomly) to the last line of one of bundled components (in this case Leaflet's MarkerClusterGroup):

Uncaught TypeError: this.sourceExpression.connect is not a function at ChildInterpolationBinding.connect (MarkerClusterGroup.Refresh.js:110) at enqueueBindingConnect (MarkerClusterGroup.Refresh.js:110) at ChildInterpolationBinding.bind (MarkerClusterGroup.Refresh.js:110) at View.bind (MarkerClusterGroup.Refresh.js:110) at If._show (MarkerClusterGroup.Refresh.js:110) at If._update (MarkerClusterGroup.Refresh.js:110) at If.conditionChanged (MarkerClusterGroup.Refresh.js:110) at BehaviorPropertyObserver.selfSubscriber (MarkerClusterGroup.Refresh.js:110) at BehaviorPropertyObserver.call (MarkerClusterGroup.Refresh.js:110) at BehaviorPropertyObserver.setValue (MarkerClusterGroup.Refresh.js:110) at If.descriptor.set [as condition] (MarkerClusterGroup.Refresh.js:110) at Object.setValue (MarkerClusterGroup.Refresh.js:110) at Binding.updateTarget (MarkerClusterGroup.Refresh.js:110) at Binding.call (MarkerClusterGroup.Refresh.js:110) at BehaviorPropertyObserver.callSubscribers (MarkerClusterGrou p.Refresh.js:110) at BehaviorPropertyObserver.call (MarkerClusterGroup.Refresh.js:110)

Cause of the issue was not related with file where stack trace was pointing to. Issue was syntax error (double dot: dto..firstName ) in binding expression in one of Aurelia templates, something like:

<input value.bind="dto..firstName" />

Template had no relation or dependency to line of code (or even JS library) where stack trace was pointing to.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM