I have this pubspec.yaml
name: Dart Pages
description: The Dart platform.
dependencies:
web_compon
I had a similar problem with TeamCity. On my development machine I can do pub get and pub build over and over and it works just great, but this only worked the very first time I built the solution using TeamCity.
After a lot of messing around I finally discovered, mostly by trial and error, that the problem was caused by TeamCity cleaning the folder before building the solution.
I can't find any reasonable documentation for how pub works, and I don't know why this only works the very first time, but my trial and error discovered that executing pub cache repair on every build before pub get and finally pub build works repeatably, and my TeamCity project now builds successfully every time.