Comments (6)
@jizhi0v0 I found what was causing the issue! In my reset.scss, I was doing
* { box-sizing: border-box; margin: 0; padding: 0; overflow-x: hidden; max-width: 100vw; }
Not sure which property was causing the issue but I just replaced "*" with "body". Now it works! So in the end, nothing was wrong with versioning or the swiper itself :) Thanks for your time!
Congratulations!Your websites are pretty!I'm a beginner.
from next.js.
I tried in my project use the same package.json.The different was i didn't use the sass.
"use client";
import { Swiper, SwiperSlide } from "swiper/react";
import "swiper/scss";
import "swiper/scss/pagination";
import { Autoplay, Pagination } from "swiper/modules";
import Image from "next/image";
import slide1 from "@/public/assets/img/surfboard.jpg";
import slide2 from "@/public/assets/img/beach-surfers.jpg";
import slide3 from "@/public/assets/img/homepage-bg.jpg";
const Carousel: React.FC = () => {
const images = [slide1, slide2, slide3];
return (
<>
<Swiper
pagination={{ clickable: true }}
modules={[Pagination, Autoplay]}
autoplay={{
delay: 3000,
}}
style={{ width: "100%", height: "100%" }}
>
{images.map((imageUrl, index) => (
<SwiperSlide key={index}>
<div>
<Image
src={imageUrl}
alt="image"
layout="fill"
objectFit="cover"
/>
</div>
</SwiperSlide>
))}
<div></div>
</Swiper>
</>
);
};
export default Carousel;
CleanShot.2024-05-10.at.14.34.24.mp4
from next.js.
Crazy... I copy your code, removed the scss and I still get the exact same issue. And this with any kind of carousels I have tried. It must be something else in my code I don't know...
from next.js.
exact
Yeah,I runned your code and got the same error.
Can you new a clean project then one by one to add these functions.
Maybe i can try this tomorrow if i have more free time.
from next.js.
@jizhi0v0 I found what was causing the issue! In my reset.scss, I was doing
* {
box-sizing: border-box;
margin: 0;
padding: 0;
overflow-x: hidden;
max-width: 100vw;
}
Not sure which property was causing the issue but I just replaced "*" with "body". Now it works! So in the end, nothing was wrong with versioning or the swiper itself :) Thanks for your time!
from next.js.
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
from next.js.
Related Issues (20)
- When a Server Action that calls `redirect` is composed with an Action on the Client `undefined` is returned to the Client. HOT 4
- NextJs[^14.2.3] build error: Cannot read properties of undefined (reading 'hasOwnProperty') HOT 1
- Turbo: json-schema-to-typescript package errors (Cannot convert undefined or null to object)
- npm run dev never finish to compile HOT 3
- project builds in Vercel but link only populates "Application error: a server-side exception has occurred" and Runlog indicates PrismaClientInitializationError
- Docs: App Router "Adding Authentication" page does not 'use server' in code.
- NextURL strips trailing slashes, even when config is set to manual trailing slash handling
- Application Crash when google translated and dropdown is chose. HOT 2
- Page is remounted when params change in (optional) catch all routes
- Middleware URL normalization does not respect `skipTrailingSlashRedirect`
- Docs: "Edit this Page on Github" Button links to nonexistent paths on some pages
- Turbopack error with next-auth middleware: `_react.default.createContext is not a function` HOT 3
- Suspense does not work as expected in Page Router index.js HOT 1
- Getting error During Build HOT 2
- Not seeing not-found page on production deployment with dynamicParams = false HOT 1
- Not seeing not-found page on production deployment with dynamicParams = false HOT 3
- Error occurred prerendering page "/". ReferenceError: self is not defined
- Cannot set Content-Type header for api route response (pages router) HOT 4
- Redis cache handler example incorrect
- Error happens when route handler called with suspense enabled HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from next.js.