Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6.4.12 is broken in Next.js #4242

Closed
yura3d opened this issue Feb 16, 2021 · 2 comments
Closed

6.4.12 is broken in Next.js #4242

yura3d opened this issue Feb 16, 2021 · 2 comments

Comments

@yura3d
Copy link

yura3d commented Feb 16, 2021

  • Swiper Version: 6.4.12
  • Platform/Target and Browser Versions: Node.js 15.8.0, Next.js 10.0.7 (SSR mode)

What You Did

Add swiper with yarn to my Next.js app, then add the next strings to my React component:

import SwiperCore, { Keyboard, Mousewheel } from 'swiper'
...
SwiperCore.use([Keyboard, Mousewheel])

Run the app in SSR mode.

Expected Behavior

No errors like it was in 6.4.11 and below.

Actual Behavior

image

I can provide the whole stacktrace but it contains only webpack-specific things and nothing related to swiper files.

I compared 6.4.12 to 6.4.11 and think that something went wrong in module bundling here.

@vltansky
Copy link
Collaborator

@jamiecounsell
Copy link

jamiecounsell commented Feb 17, 2021

I am also having this exact same issue in a react app bundled with webpack (no next.js around). Same function coming up as "is not a function" when called.

Looking at the diff between the version we're running (6.4.10, working) and the updated version (6.4.12, failing), I do see a few changes related to bundling that have likely caused this, though I haven't had time to dig into it much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants