I have this pubspec.yaml
name: Dart Pages
description: The Dart platform.
dependencies:
web_compon
Have you run pub install
since you created the "web" directory? If not, try that. You need to have a "packages" directory inside the directory that contains your Dart entrypoint in order for "package:" imports to resolve correctly.
Pub will create those directories for you, but it needs to know to do that. If you add a new directory to your package, you'll want to run pub install
again so it add a "packages" directory to it.