akiran / react-slick

React carousel component
http://react-slick.neostack.com/
MIT License
11.73k stars 2.1k forks source link

(track.js) Uncaught TypeError: Super expression must either be null or a function, not undefined #1347

Closed jessevdp closed 4 years ago

jessevdp commented 6 years ago

Hi there. Updating from v0.22.3 to v0.23.x causes an issue. Running it causes an error in one of the underlying parts. (lib/track.js)

Any idea on why this is happening or how to resolve it?

Here is the raw log:

Uncaught TypeError: Super expression must either be null or a function, not undefined
    at _inherits (track.js:24)
    at track.js:182
    at Object._get (track.js:209)
    at __webpack_require__ (bootstrap 18c670352a10bb0e40b8:659)
    at fn (bootstrap 18c670352a10bb0e40b8:85)
    at Object.exports.__esModule (inner-slider.js:32)
    at __webpack_require__ (bootstrap 18c670352a10bb0e40b8:659)
    at fn (bootstrap 18c670352a10bb0e40b8:85)
    at Object.<anonymous> (slider.js:11)
jessevdp commented 6 years ago

Hiya, it's been over a week with no response. Has anyone had the time to look at this? Does anyone else have this problem?

tyler-copilot commented 6 years ago

Hiya, it's been over a week with no response. Has anyone had the time to look at this? Does anyone else have this problem?

I upgraded from 0.15 to 0.23.1 and started having this problem. No idea how to resolve. Moving back to 0.22.3 until we can figure out what's up

xwchris commented 6 years ago

why still not fixed~

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

iamsarthakjoshi commented 1 year ago

If you're using NextJS 13, make sure use include use client on top of the file. As the Slider data is dynamic, so the new NextJS expects the component to be Client Component.

'use client';
john-subba commented 1 year ago

If you're using NextJS 13, make sure use include use client on top of the file. As the Slider data is dynamic, so the new NextJS expects the component to be Client Component.

'use client';

Thanks dude was so confused at this issue. Saved alot of time.

manishprajapatidev commented 1 year ago

o the new NextJS expects the component to be Client Component.

'use client';

Life saver?

rezzakali commented 1 year ago

'use client'

RSAK56 commented 11 months ago

Thanks for this response. Honestly, I saved a lot of time.

mvacoimbra commented 11 months ago

If you're using NextJS 13, make sure use include use client on top of the file. As the Slider data is dynamic, so the new NextJS expects the component to be Client Component.

'use client';

my savior

lymarrie commented 10 months ago

praying chatgpt learns the nextjs app router soon

salimslah commented 8 months ago

if i wan to get the img from dummyjson Api this error shows Error: Unsupported Server Component type: undefined please help

LochanJangid commented 5 months ago

If you're using NextJS 13, make sure use include use client on top of the file. As the Slider data is dynamic, so the new NextJS expects the component to be Client Component.

'use client';

But my code is not working. here is my code --> **

'use client' import React from 'react'; import { BANNER_THINGS } from "@/constants"; import Image from "next/image"; import Link from "next/link"; import Slider from 'react-slick';

const Swiperr = () => { var settings = { dots: true, infinite: true, speed: 500, slidesToShow: 1, slidesToScroll: 1 };

return ( <Slider {...settings}> {BANNER_THINGS.map((things) => (

{things.paragraph}

{things.title}

banner bhai
      ))}
    </Slider>

); };

export default Swiperr;

**

john-subba commented 5 months ago

If you're using NextJS 13, make sure use include use client on top of the file. As the Slider data is dynamic, so the new NextJS expects the component to be Client Component.

'use client';

But my code is not working. here is my code --> **

'use client' import React from 'react'; import { BANNER_THINGS } from "@/constants"; import Image from "next/image"; import Link from "next/link"; import Slider from 'react-slick'; const Swiperr = () => { var settings = { dots: true, infinite: true, speed: 500, slidesToShow: 1, slidesToScroll: 1 }; return ( <Slider {...settings}> {BANNER_THINGS.map((things) => (

{things.paragraph}

{things.title}

{things.button}

banner bhai

))}

); }; export default Swiperr;

**

I don't see any problem here. It should work u must be having another issue rather than the issue that comes with not using of use-client