Skip to content

flutter web compile fails 'Unable to find modules for some sources' #48481

@bsutton

Description

@bsutton

I have a small project I'm using to dev/test a widget.
I'm trying to use the flutter beta channel and run the project as a web app.

I've pushed the app to github so you can reproduce the problem:

https://github.com/bsutton/minicard

The app was compiling fine until I added the provider package to the pubspec.yaml.

I'm now receiving the following compile error:

Launching lib/main.dart on Chrome in debug mode...

Unable to find modules for some sources, this is usually the result of either a
bad import, a missing dependency in a package (or possibly a dev_dependency
needs to move to a real dependency), or a build failure (if importing a
generated file).

Please check the following imports:

`import 'package:provider/provider.dart';` from minicard|lib/widgets/mini_card.dart at 2:1
Failed after 76ms
Failed to build application for the Web.
Exited (sigterm)
flutter doctor -v
[✓] Flutter (Channel beta, v1.12.13+hotfix.6, on Linux, locale en_AU.UTF-8)
    • Flutter version 1.12.13+hotfix.6 at /home/bsutton/apps/flutter
    • Framework revision 18cd7a3601 (4 weeks ago), 2019-12-11 06:35:39 -0800
    • Engine revision 2994f7e1e6
    • Dart version 2.7.0

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /home/bsutton/Android/Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • Java binary at: /home/bsutton/apps/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Android Studio (version 3.5)
    • Android Studio at /home/bsutton/apps/android-studio
    • Flutter plugin version 40.2.2
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] IntelliJ IDEA Community Edition (version 2018.3)
    • IntelliJ at /home/bsutton/apps/intellij/idea-IC-183.5912.21
    • Flutter plugin version 37.0.1
    • Dart plugin version 183.6270

[✓] Connected device (2 available)
    • Chrome     • chrome     • web-javascript • Google Chrome 79.0.3945.88
    • Web Server • web-server • web-javascript • Flutter Tools

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: crashStack traces logged to the consoleplatform-webWeb applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions