After Installing Dart and Dart Editor I consistently get the following error on different DartLang.org code samples:
--- 5:00:06 PM Auto running pub get on C:\dart\sample-tracker-master ... ---
Pub get failed, [1] Resolving dependencies...
Could not find package path.dart at https://pub.dartlang.org.
Depended on by:
- tracker 0.0.0
Why is PUB Manager unable to to find this package?
Pubspec.yaml contents follow:
name: polymer_and_dart
description: Sample app built with the polymer.dart package
environment:
sdk: '>=1.2.0 <2.0.0'
dependencies:
polymer: '>=0.15.1 <0.16.0'
dev_dependencies:
unittest: '>=0.10.0 <0.11.0'
transformers:
- polymer:
entry_points:
- web/begin/index.html
- web/end/index.html
Your pubspec.yaml
looks fine. IMO, The problem is breakage of cache directory.
Many people seems to meet this issue, See Link
If pub cache repair
cannot fix this issue.
You can manually delete package cache directory. and run pub get
again.
From Windows. Delete C:\\Users\\<your account>\\AppData\\Roaming\\Pub\\Cache
manually. and run pub get
.
Hope this work.
Can you please add the content of your pubspec.yaml
file to your question. path.dart
is not a valid package name, the name of the package is only path
. When you want to use a library of the path
package you import package:path/path.dart
though but in pubspec.yaml
you reference the package name which doesn't have a .dart
extension.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.