Skip to content

Getting Vercel deployment error for Flutter web app code imported from flutterflow. Carousel_slider dependency is failing. Error: 'CarouselController' is imported from both 'package:carousel_slider/carousel_controller.dart' and 'package:flutter/src/material/carousel.dart'. #3116

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

Closed
2 tasks done
dhirajbajaj opened this issue Jun 13, 2024 · 3 comments
Assignees

Comments

@dhirajbajaj
Copy link

Can we access your project?

  • I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.

Current Behavior

Hi,
I am getting an error while deploying a flutter-web app on vercel.
I imported the code from flutterflow and while deploying carousal_slider: 4.2.1 is breaking in logs;

The error is :
_'CarouselController' is imported from both 'package:carousel_slider/carousel_controller.dart' and 'package:flutter/src/material/carousel.dart'._

The same issue has been posted to carousel slider github repo.
serenader2014/flutter_carousel_slider#444

Possible cause:
The repo is not maintained anymore and works for flutter sdk: <3 and breaking on flutter sdk version> 3.0.0.

Expected Behavior

It should just deploy.

Steps to Reproduce

Try to deploy any flutter web project imported from flutterflow with carousal_slider:4.2.1 to vercel.

The logs will show the issue as follows:
image

Reproducible from Blank

  • The steps to reproduce above start from a blank project.

Bug Report Code (Required)

ITEelsrq+ZROpbxG1s7ub/pvhQMwJEQnarhE0+wbdwshfJDpEIl3Ps78SxJLYtTmen9EC1eKq3wJp9bykdjlDMc4FAqsf6E41b5XQQvdcFOhRLqJC8yKYHdRHp5PfG6Y0KTYvyZvPtFpSiUn3DuEOfCdG3qCf9qOYwx5e6fDbOY=

Visual documentation

Pubspec dependecy:

image

Error log in Vercel:

Screenshot 2024-06-13 15 16 53

Environment

- FlutterFlow version: 
environment:
  sdk: ">=3.0.0 <4.0.0"

dependencies:
  flutter:
    sdk: flutter

- Platform:Web
- Browser name and version: NA, Chrome
- Operating system and version affected: NA

Additional Information

environment:
sdk: ">=3.0.0 <4.0.0"

dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter

@dhirajbajaj dhirajbajaj added the status: needs triage A potential issue that has not been confirmed as a bug. label Jun 13, 2024
@rzambroni rzambroni self-assigned this Jun 14, 2024
@rzambroni rzambroni removed the status: needs triage A potential issue that has not been confirmed as a bug. label Jun 14, 2024
Copy link
Collaborator

Hi @dhirajbajaj, as you mentioned, it appears to be an error on the package being used under the hood. Not really something we fix. I saw someone posted a workaround on the original issue, hope that helps.

@rzambroni rzambroni closed this as not planned Won't fix, can't repro, duplicate, stale Jun 14, 2024
@rzambroni rzambroni added the closed: other label Jun 14, 2024 — with Linear
@dhirajbajaj
Copy link
Author

Hey @rzambroni Yes i have fixed it by changing the code as mentioned and deployment has worked.

But, i am concerned that when i have to deploy the code again, I will have to redo all the changes again.
The issue is the code-generator of flutterflow is using an old version carousel_slider package which is breaking with new flutter versions (>3.0) as its no longer maintained. The fix is to use another package and make code changes.

  # carousel_slider: 4.2.1
  carousel_slider_plus: ^6.0.0

@HamidKhanmohammadi
Copy link

I followed @dhirajbajaj path and my problem was solved. thanks for @dhirajbajaj

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

No branches or pull requests

3 participants