Skip to content
This repository has been archived by the owner on Jan 26, 2021. It is now read-only.

Can't import googleapis to flutter for web #60

Open
DuEyE opened this issue Aug 29, 2019 · 5 comments
Open

Can't import googleapis to flutter for web #60

DuEyE opened this issue Aug 29, 2019 · 5 comments

Comments

@DuEyE
Copy link

DuEyE commented Aug 29, 2019

I added the below lines to my pubspec.yaml and imported the package.
googleapis: 0.54.0
googleapis_auth: 0.2.10

[WARNING]build_web_compilers:ddc_modules on lib/.ddc.meta_module.raw: Unable to read module information for package:googleapis_auth, make sure you have a dependency on it in your pubspec.
[SEVERE]build_web_compilers:entrypoint on web/main.dart: 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:googleapis_auth/auth_io.dart"; from smartmirror_dueye|lib/setup/Login.dart at 5:1

[INFO] Running build completed, took 228ms
[INFO] Caching finalized dependency graph completed, took 145ms
[SEVERE] Failed after 377ms
[INFO] -------------------------------------------------------------------------------------------------------------------------------------------------

@itsatifsiddiqui
Copy link

Have you figured out any solution ?

@loint
Copy link

loint commented Jan 18, 2020

Same issue. I spent my day to resolve but unclear why breaking change happend and build broken with above error which leads to 404 main.dart.js

@itsatifsiddiqui
Copy link

@loint try with flutter version 13.0 ... for me it worked when I switched flutter to v13.0 .

@loint
Copy link

loint commented Jan 20, 2020

Thanks @itsatifsiddiqui It worked now - no need to upgrade to v13.0
I fixed by specify build.yaml and flutter packages pub global run webdev serve

@loint
Copy link

loint commented Jan 20, 2020

build.yaml

  $default:
    sources:
      - lib/**
      - web/**
      - pubspec.*
    builders:
      build_web_compilers|entrypoint:
        generate_for:
        - web/**.dart
        - lib/**.dart

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

4 participants