ngx-slider
ngx-slider copied to clipboard
core.js:4073 ERROR Error: Expecting instance of DOM Element
issue after upgrading angular 9 to 10.
core.js:4073 ERROR Error: Expecting instance of DOM Element at assertDomElement (core.js:18198) at getListeners (core.js:18114) at DebugNode__POST_R3__.get listeners [as listeners] (core.js:28572) at DebugRenderer2.listen (core.js:31374) at EventListenerHelper.attachEventListener (ng5-slider.js:680) at SliderComponent.onStart (ng5-slider.js:2703) at ng5-slider.js:2608 at SafeSubscriber._next (ng5-slider.js:686) at SafeSubscriber.push../node_modules/ng5-slider/node_modules/rxjs/Subscriber.js.SafeSubscriber.__tryOrUnsub (Subscriber.js:242) at SafeSubscriber.push../node_modules/ng5-slider/node_modules/rxjs/Subscriber.js.SafeSubscriber.next (Subscriber.js:189)
@soorireddy Do you find any solution ?
Got the same problem, angular 10 - every time I try moving the any slider circle know I got this error ERROR Error: Expecting instance of DOM Element at assertDomElement (core.js:18271) at getListeners (core.js:18187) at DebugNode__POST_R3__.get (core.js:28530) at DebugRenderer2.listen (core.js:31332) at EventListenerHelper.attachEventListener (event-listener-helper.ts:76) at SliderComponent.onStart (slider.component.ts:1810) at slider.component.ts:1701 at SafeSubscriber._next (event-listener-helper.ts:83) at SafeSubscriber.__tryOrUnsub (Subscriber.ts:258) at SafeSubscriber.next (Subscriber.ts:208)
I have aot: true In angular.json. I have "enableIvy": false in tsconfig.json.
I am using version 1.2.6. @rzajac @piotrdz @ValentinH any solutions??
It looks like it is blowing up on attaching an event listener to global document
object.
If document
is not defined, or is patched/replaced somewhere, there is little I can do.
To find out more, we would need a minimum reproduction example such as a StackBlitz, where the problem can be reliably reproduced.
I don't think there is any problem with my code as with version 1.1.13 works with no problems. Only after I update to 1.2.6, I got this error. Can you give it a check with angular 10 and ivy OFF? I will try to reproduce an example on StackBlitz.
@danfleser Before marking a release, I run through a list of supported Angular versions, including variants with and without Ivy.
So I still cannot reproduce it, even with a freshly created Angular 10 project with Ivy turned off.
I suspect it might be one or two things:
- an interplay with specific rxjs version you are using in your project,
- how slider options are used, or changed at runtime.
Either way, I would need a demonstrable StackBlitz example to solve this.
Same problem after upgrading angular 8 to 9.
My solution: Clone repository in another directory and npm install
Same problem for me. Our situation is a bit different. The control works correctly in a local environment but gets the error the moment we put the application in a hosted environment.
Closing old issues related to previous Angular versions. Newest release supports current Angular version (17) without issues.