Uncaught TypeError: Cannot read property 'slickAdd' of undefined
See original GitHub issueshort description of the bug / issue, provide more detail below.
====================================================================
[ http://jsfiddle.net/o78gcLuu/1 ]
====================================================================
Steps to reproduce the problem
tl;dr - See jsFiddle link above
- Use
slickAdd
command for making carousel - Voila!
Cannot read property 'slickAdd' of undefined
====================================================================
What is the expected behaviour?
Carousel should work
====================================================================
What is observed behaviour?
An error. Uncaught TypeError: Cannot read property 'slickAdd' of undefined
====================================================================
More Details
- Which browsers/versions does it happen on? Chrome 60.0.3112.90
- Which jQuery/Slick version are you using? jQuery 3.1.1, Slick 1.6.0
- Did this work before? IDK.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
Error in slick.js: "Uncaught TypeError: Cannot read property ...
... this code I got slider working, but its not coming proper I am getting error: Uncaught TypeError: Cannot read property 'add' of...
Read more >Cannot Read Property 'slickAdd' in INIT call #3452
js Carousel loads in correctly, and the init call fires, but then I get a Uncaught TypeError Cannot read property 'slickAdd' of undefined...
Read more >slick slider error Uncaught TypeError: Cannot read property ...
I have applied slick slider in the phtml file but is giving error. Uncaught TypeError: Cannot read property ' ...
Read more >Cannot read properties of undefined' - JavaScript Debugging
JavaScript Tutorial. How To Fix ' Uncaught TypeError : Cannot read properties of undefined ' - JavaScript Debugging. 26K views 6 months ago....
Read more >JS erros : Uncaught TypeError: Cannot read properties
[This thread is closed.] Hi, I have JS erros Uncaught TypeError: Cannot read properties of null (reading 'add'). https://ibb.co/pL7mpJj…
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I saw another issue where methods being called IN the init function were causing this Uncaught Error. Although, not a permanent fix, but a fix nonetheless, wrapping the called method in a setTimeout(method, 0) works.
I’m guessing it’s just the timing of the init call that’s just calling slick methods before everything is ACTUALLY initialized, and to wrap the function in a setTimeout was enough of a delay to resolve the issue.
@sookcha the version used in the original issue is 1.8.1 (in the jsfiddle), where you are using 1.3.13 in your 09/04/2017 response. I hardly call that a solution when you are regressing the version.
I am also having the same issue, where I call the initial slick options, but my problems start after I call the slick init.
SEE FIDDLE HERE