question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught TypeError: Cannot read property 'slickAdd' of undefined

See original GitHub issue

short 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

  1. Use slickAdd command for making carousel
  2. 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:open
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
Murphy1976commented, Apr 10, 2018

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.

1reaction
Murphy1976commented, Apr 10, 2018

@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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found