gmpassos / howler.dart

Dart audio library for the modern web. Dart port of Howler.js (https://github.com/goldfire/howler.js)
MIT License
31 stars 6 forks source link

Issue building for mobile #2

Closed mrhumbility closed 4 years ago

mrhumbility commented 4 years ago

Hey,

If i'm importing howler.dart to my project it stops letting me build for the mobile emulator and I'm having trouble figuring out how to get around this. I get error messages about howler_base.dart not being able to import a handful of the files it's trying to import. Everything works as expected when I build for chrome, just not when I try to build for an android emulator. Any help with fixing this would be amazing, thanks!

Launching lib\main.dart on Android SDK built for x86 in debug mode...

Compiler message:
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:12:8: Error: Not found: 'dart:html'
import 'dart:html';
       ^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:15:8: Error: Not found: 'dart:web_audio'
import 'dart:web_audio';
       ^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+4/lib/src/browser_client.dart:6:8: Error: Not found: 'dart:html'
import 'dart:html';
       ^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:35:3: Error: Type 'GainNode' not found.
  GainNode masterGain ;
  ^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:39:3: Error: Type 'AudioContext' not found.
  AudioContext ctx ;
  ^^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:45:3: Error: Type 'Navigator' not found.
  Navigator _navigator ;
  ^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:254:27: Error: Type 'AudioElement' not found.
  static bool canPlayType(AudioElement audioTest, String type) {
                          ^^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:264:3: Error: Type 'AudioBuffer' not found.
  AudioBuffer _scratchBuffer ;
  ^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:384:3: Error: Type 'AudioElement' not found.
  AudioElement _obtainHtml5Audio() {
  ^^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:1982:22: Error: Type 'AudioBuffer' not found.
  final Map<_HowlSrc,AudioBuffer> _cache = {};
                     ^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:2066:19: Error: Type 'AudioBuffer' not found.
  void _loadSound(AudioBuffer buffer) {
                  ^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:2363:3: Error: Type 'AudioElement' not found.
  AudioElement audio ;
  ^^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:2364:3: Error: Type 'GainNode' not found.
  GainNode gainNode ;
  ^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:2366:3: Error: Type 'AudioBufferSourceNode' not found.
  AudioBufferSourceNode bufferSource ;
  ^^^^^^^^^^^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:2369:3: Error: Type 'EventTarget' not found.
  EventTarget get eventTarget => gainNode != null ? gainNode : audio ;
  ^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:2399:3: Error: Type 'AudioNode' not found.
  AudioNode _panner ;
  ^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:2407:3: Error: Type 'EventListener' not found.
  EventListener _loadFn ;
  ^^^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:2408:3: Error: Type 'EventListener' not found.
  EventListener _errorFn ;
  ^^^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+4/lib/src/browser_client.dart:34:18: Error: 'HttpRequest' isn't a type.
  final _xhrs = <HttpRequest>{};
                 ^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:35:3: Error: 'GainNode' isn't a type.
  GainNode masterGain ;
  ^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:39:3: Error: 'AudioContext' isn't a type.
  AudioContext ctx ;
  ^^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:45:3: Error: 'Navigator' isn't a type.
  Navigator _navigator ;
  ^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:53:23: Error: The getter 'window' isn't defined for the class '_HowlerGlobal'.
 - '_HowlerGlobal' is from 'package:howler/src/howler_base.dart' ('/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'window'.
    this._navigator = window.navigator ;
                      ^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:191:13: Error: Method not found: 'AudioElement'.
        new AudioElement() ;
            ^^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:201:22: Error: Method not found: 'AudioElement'.
      var test = new AudioElement();
                     ^^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:220:5: Error: 'AudioElement' isn't a type.
    AudioElement audioTest = null;
    ^^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:224:23: Error: Method not found: 'AudioElement'.
      audioTest = new AudioElement() ;
                      ^^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:254:27: Error: 'AudioElement' isn't a type.
  static bool canPlayType(AudioElement audioTest, String type) {
                          ^^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:264:3: Error: 'AudioBuffer' isn't a type.
  AudioBuffer _scratchBuffer ;
  ^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:296:5: Error: The getter 'document' isn't defined for the class '_HowlerGlobal'.
 - '_HowlerGlobal' is from 'package:howler/src/howler_base.dart' ('/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'document'.
    document.addEventListener('touchstart', _unlock, true);
    ^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:297:5: Error: The getter 'document' isn't defined for the class '_HowlerGlobal'.
 - '_HowlerGlobal' is from 'package:howler/src/howler_base.dart' ('/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'document'.
    document.addEventListener('touchend', _unlock, true);
    ^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:298:5: Error: The getter 'document' isn't defined for the class '_HowlerGlobal'.
 - '_HowlerGlobal' is from 'package:howler/src/howler_base.dart' ('/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'document'.
    document.addEventListener('click', _unlock, true);
    ^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:317:27: Error: Method not found: 'AudioElement'.
      var audioNode = new AudioElement();
                          ^^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:368:7: Error: The getter 'document' isn't defined for the class '_HowlerGlobal'.
 - '_HowlerGlobal' is from 'package:howler/src/howler_base.dart' ('/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'document'.
      document.removeEventListener('touchstart', _unlock, true);
      ^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:369:7: Error: The getter 'document' isn't defined for the class '_HowlerGlobal'.
 - '_HowlerGlobal' is from 'package:howler/src/howler_base.dart' ('/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'document'.
      document.removeEventListener('touchend', _unlock, true);
      ^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:370:7: Error: The getter 'document' isn't defined for the class '_HowlerGlobal'.
 - '_HowlerGlobal' is from 'package:howler/src/howler_base.dart' ('/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'document'.
      document.removeEventListener('click', _unlock, true);
      ^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:393:24: Error: Method not found: 'AudioElement'.
    var testPlay = new AudioElement().play();
                       ^^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:401:16: Error: Method not found: 'AudioElement'.
    return new AudioElement();
               ^^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:397:9: Error: The getter 'window' isn't defined for the class '_HowlerGlobal'.
 - '_HowlerGlobal' is from 'package:howler/src/howler_base.dart' ('/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'window'.
        window.console.warn( 'HTML5 Audio pool exhausted, returning potentially locked audio object.' ) ;
        ^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:696:7: Error: The getter 'window' isn't defined for the class 'Howl'.
 - 'Howl' is from 'package:howler/src/howler_base.dart' ('/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'window'.
      window.console.error('An array of source files must be passed with any new Howl.') ;
      ^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:822:9: Error: The getter 'window' isn't defined for the class 'Howl'.
 - 'Howl' is from 'package:howler/src/howler_base.dart' ('/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'window'.
        window.console.warn('No file extension was found. Consider using the "format" property or specify an extension.');
        ^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:842:9: Error: The getter 'window' isn't defined for the class 'Howl'.
 - 'Howl' is from 'package:howler/src/howler_base.dart' ('/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'window'.
    if (window.location.protocol == 'https:' && url.substring(0, 5) == 'http:') {
        ^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:1122:9: Error: 'EventListener' isn't a type.
        EventListener listener = (e) {
        ^^^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:1982:22: Error: 'AudioBuffer' isn't a type.
  final Map<_HowlSrc,AudioBuffer> _cache = {};
                     ^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:2010:7: Error: The getter 'HttpRequest' isn't defined for the class 'Howl'.
 - 'Howl' is from 'package:howler/src/howler_base.dart' ('/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'HttpRequest'.
      HttpRequest.request(url,
      ^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:2066:19: Error: 'AudioBuffer' isn't a type.
  void _loadSound(AudioBuffer buffer) {
                  ^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:2363:3: Error: 'AudioElement' isn't a type.
  AudioElement audio ;
  ^^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:2364:3: Error: 'GainNode' isn't a type.
  GainNode gainNode ;
  ^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:2366:3: Error: 'AudioBufferSourceNode' isn't a type.
  AudioBufferSourceNode bufferSource ;
  ^^^^^^^^^^^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:2399:3: Error: 'AudioNode' isn't a type.
  AudioNode _panner ;
  ^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:2407:3: Error: 'EventListener' isn't a type.
  EventListener _loadFn ;
  ^^^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:2408:3: Error: 'EventListener' isn't a type.
  EventListener _errorFn ;
  ^^^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/howler-1.0.4/lib/src/howler_base.dart:2563:22: Error: Method not found: 'AudioContext'.
    Howler.ctx = new AudioContext();
                     ^^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+4/lib/src/browser_client.dart:58:34: Error: 'Blob' isn't a type.
      var blob = xhr.response as Blob ?? Blob([]);
                                 ^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+4/lib/src/browser_client.dart:46:15: Error: The method 'HttpRequest' isn't defined for the class 'BrowserClient'.
 - 'BrowserClient' is from 'package:http/src/browser_client.dart' ('/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+4/lib/src/browser_client.dart').
Try correcting the name to the name of an existing method, or defining a method named 'HttpRequest'.
    var xhr = HttpRequest();
              ^^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+4/lib/src/browser_client.dart:58:42: Error: The method 'Blob' isn't defined for the class 'BrowserClient'.
 - 'BrowserClient' is from 'package:http/src/browser_client.dart' ('/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+4/lib/src/browser_client.dart').
Try correcting the name to the name of an existing method, or defining a method named 'Blob'.
      var blob = xhr.response as Blob ?? Blob([]);
                                         ^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+4/lib/src/browser_client.dart:59:20: Error: The method 'FileReader' isn't defined for the class 'BrowserClient'.
 - 'BrowserClient' is from 'package:http/src/browser_client.dart' ('/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/.pub-cache/hosted/pub.dartlang.org/http-0.12.0+4/lib/src/browser_client.dart').
Try correcting the name to the name of an existing method, or defining a method named 'FileReader'.
      var reader = FileReader();
                   ^^^^^^^^^^
/C:/Users/james/Documents/flutterv1.12.13+hotfix.5-stable/packages/flutter/lib/src/painting/_network_image_web.dart:64:12: Error: Method not found: 'webOnlyInstantiateImageCodecFromUrl'.
    return ui.webOnlyInstantiateImageCodecFromUrl(resolved) as Future<ui.Codec>; // ignore: undefined_function
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
U
nhandled exception:
FileSystemException(uri=org-dartlang-untranslatable-uri:dart%3Ahtml; message=StandardFileSystem onl
y supports file:* and data:* URIs)
#0      StandardFileSystem.entityForUri  (package:front_end/src/api_prototype/standard_file_system.dart:33:7)

#1      asFileUri (package:vm/kernel_front_end.
dart:604:37)
#2      writeDepfile  (package:vm/kernel_front_end.dart:799:21)
<asynchronous su
spension>

#3      FrontendCompiler.compile (package:frontend_server/frontend_server.dar
t:472:15)
<asynchronous suspension>
#4      _FlutterFrontendCompiler.compile (package:flut
ter_frontend_server/server.dart:38:22)
#5      starter (package:flutter_frontend_se
rver/server.dart:149:27)
#6      main (file:///C:/b/s/w/ir/cache/builder/src/flutter/flutter_frontend_server/bin/s
tarter.dart:8:30)
#7      _startIsolate.<anonymous closure> (dart:is
olate-patch/isolate_patch.dart:
305:32)
#8      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate
_patch.dart:174:12)
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.

FAILURE: Build failed with an exception.

* Where:
Script 'C:\Users\james\Documents\flutterv1.12.13+hotfix.5-stable\packages\flutter_tools\gradle\flutter.gradle' line: 801

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\Users\james\Documents\flutterv1.12.13+hotfix.5-stable\bin\flutter.bat'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org
BUILD FAILED in 7s
Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
gmpassos commented 4 years ago

This library only works inside the browser. You are trying to compile a Flutter project.

Take a look in this other library: https://pub.dev/packages/import_js_library