Skip to content

Publish to none entry on pubspec yaml file needed for local packages not for publishing #7183

@srinivasan-sr

Description

@srinivasan-sr

Page URL

https://dart.dev/learn/tutorial/packages-libs

Page source

https://github.com/dart-lang/site-www/blob/main/src/content/learn/tutorial/packages-libs.md

Describe the problem

Upon adding the command_runner package created locally to the pubspec.yaml file of dartpedia/cli, Dart SDK will complain that 'Publishable packages can't have "path" dependencies.'

Image

Expected fix

Add the following line to pubspec.yaml in dartpedia/cli at the top of the file, below the version detail.
publish_to: none

This will allow the command_runner package to be used locally as we are not publishing it currently.

Image

Additional context

Dart SDK version: 3.11.0 (stable)
OS: Fedora Linux - KDE Plasma Edition - 43

I would like to fix this problem.

  • I will try and fix this problem on dart.dev.

Metadata

Metadata

Assignees

Labels

a.tut.tutorialRelates to the Tutorial section of dart.deve0-minutesCan complete in < 60 minutes of normal, not dedicated, workfrom.page-issueReported in a reader-filed concernp2-mediumNecessary but not urgent concern. Resolve when possible.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions