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

Swiper 11.1.2 TypeScript issue #7529

Closed
5 of 6 tasks

Comments

@Kbdq
Copy link

Kbdq commented May 13, 2024

Check that this is really a bug

  • I confirm

Reproduction link

not necessary

Bug description

I'm using Swiper in Angular v 17 project with TypeScript 5.3.3. After update Swiper to version 11.1.2 it results in the following error:

Error: node_modules/.pnpm/swiper@11.1.2/node_modules/swiper/types/shared.d.ts:1:24 - error TS2846: A declaration file cannot be imported without 'import type'. Did you mean to import an implementation file './index.js' instead?

import { Swiper } from './index.d.ts';

The solution is to remove 'd.ts', in other words, just replace it with

import { Swiper } from './index';

or to rollback back to 11.1.1 - it works normal

Expected Behavior

No response

Actual Behavior

No response

Swiper version

11.1.2

Platform/Target and Browser Versions

no matter

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
  • Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

  • I'm willing to open a PR
@SureshKumarToverto
Copy link

We're encountering the same error today, and it's causing a blocker for us. Could you please assist us as soon as possible? Thanks in advance.

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