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.

Slider giving `NaN` is an invalid value for the `top` css style property.

See original GitHub issue

https://codesandbox.io/s/kk3mpx80z5

If you look at the console im getting:

Warning: `NaN` is an invalid value for the `top` css style property.


Check the render method of `Slider`.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:5

github_iconTop GitHub Comments

1reaction
Yeswanth-JGcommented, Jun 29, 2020

I am getting similar issue…

But I am getting the error for the ‘left’ property. Below is the full error trace.

But the plugin works.

    Warning: `NaN` is an invalid value for the `left` css style property.
    in div (created by Slider)
    in div (created by Track)
    in Track (created by InnerSlider)
    in div (created by InnerSlider)
    in div (created by InnerSlider)
    in InnerSlider (created by Slider)
    in Slider (at sliderLayout.js:99)
    in div (at sliderLayout.js:98)
    in SliderLayer (at Home.js:20)
    in div (at Home.js:19)
    in Home (created by Route)

I am using below versions of the s/w.

    "react-slick": "^0.26.1",
    "slick-carousel": "^1.8.1"
0reactions
Yeswanth-JGcommented, Jun 29, 2020

I am getting similar issue…

But I am getting the error for the ‘left’ property. Below is the full error trace.

But the plugin works.

    Warning: `NaN` is an invalid value for the `left` css style property.
    in div (created by Slider)
    in div (created by Track)
    in Track (created by InnerSlider)
    in div (created by InnerSlider)
    in div (created by InnerSlider)
    in InnerSlider (created by Slider)
    in Slider (at sliderLayout.js:99)
    in div (at sliderLayout.js:98)
    in SliderLayer (at Home.js:20)
    in div (at Home.js:19)
    in Home (created by Route)

I am using below versions of the s/w.

    "react-slick": "^0.26.1",
    "slick-carousel": "^1.8.1"

This issue is coming for me in my project. But this issue is not coming up in the online playground, where we are using React DOM attachment in the same file.

In our project, we are using the react DOM hooking in the root js.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix material-ui `NaN` is an invalid value for the `width ...
Does anyone have idea about it? Warning: `NaN` is an invalid value for the `width` css style property. in span (created by Ripple)...
Read more >
`NaN` is an invalid value for the `width` css style property - Web
Everytime I join a meeting, I always get this error in the console, though I can successfully join a meeting, it just bothers...
Read more >
HTML Standard
... 14 The XML syntax; 15 Rendering; 16 Obsolete features; 17 IANA considerations; Index; References; Acknowledgments; Intellectual property rights ...
Read more >
HTML DOM Input Range value Property - W3Schools
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP,...
Read more >
HTML DOM Style marginLeft Property - W3Schools
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP,...
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