Skip to content

I couldn't pub get a package from gitlab repository that contains two packages #74878

@yukitaka13-1110

Description

@yukitaka13-1110

Steps to Reproduce

I forked a package published to dartpub.
DartPub
GitLab
This package contains twilio_programmable_video and twilio_programmable_video_platform_interface.
twilio_programmable_video depends on twilio_programmable_video_platform_interface in the repository by relative path.
Tree is like this.

packages
    ├ packageA
        └ pubspec.yaml
    └ packageB
        └ pubspec.yaml

I rewrite pubspec.yaml as the following.

dependency_overrides:
  twilio_programmable_video_platform_interface:
    git:
      url: ssh://git@gitlab.com/myname/programmable-video.git
      ref: master
      path: programmable_video_platform_interface
  twilio_programmable_video:
    git:
      url: ssh://git@gitlab.com/myname/programmable-video.git
      ref: master
      path: programmable_video

Then I tried to flutter pub get and failed with the following error.

Error on line 17, column 11: Invalid description in the "twilio_programmable_video" pubspec on the "twilio_programmable_video_platform_interface" dependency: "../programmable_video_platform_interface" is a relative path, but this isn't a local pubspec.
   ╷
17 │     path: ../programmable_video_platform_interface
   │           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
pub get failed (65;    ╵)

My pubspec.yaml is wrong?
Is there another way to write it correctly?

Expected results:
flutter pub get finish successfully.

Actual results:
An error occurred when flutter pub get.

Logs
$ flutter pub get


Error on line 17, column 11: Invalid description in the "twilio_programmable_video" pubspec on the "twilio_programmable_video_platform_interface" dependency: "../programmable_video_platform_interface" is a relative path, but this isn't a local pubspec.
   ╷
17 │     path: ../programmable_video_platform_interface
   │           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵
pub get failed (65;    ╵)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions