0

If I 'Pub Build - Minified' my application compiles and runs correctly. If I instead I do 'Pub Build - Debug' I get the following errors:

[Error from Dart2JS on App|web/view_assignment.dart]:
web\code_admin.dart:6:8:
Can't read 'package:intl/intl.dart' (Could not find asset intl|lib/intl.dart.).
import 'package:intl/intl.dart';
       ^^^^^^^^^^^^^^^^^^^^^^^^
[Info from Dart2JS]:
Took 0:00:07.185411 to compile App|web/view_assignment.dart.
[Info from Dart2JS]:
Compiling App|web/main.dart...
[Error from Dart2JS on App|web/main.dart]:
web\code_admin.dart:6:8:
Can't read 'package:intl/intl.dart' (Could not find asset intl|lib/intl.dart.).
import 'package:intl/intl.dart';
       ^^^^^^^^^^^^^^^^^^^^^^^^
[Warning from Dart2JS on App|web/main.dart]:
web\index_view.dart:97:7:
Cannot resolve type 'DateFormat'.
      DateFormat acceptUntilFormat = new DateFormat('yyyy-MM-dd H:m');
      ^^^^^^^^^^
[Warning from Dart2JS on App|web/main.dart]:
web\index_view.dart:97:42:
Cannot resolve 'DateFormat'.
      DateFormat acceptUntilFormat = new DateFormat('yyyy-MM-dd H:m');
                                         ^^^^^^^^^^
[Info from Dart2JS]:
Took 0:00:06.744386 to compile App|web/main.dart.
Build failed.

My pubspec.yaml has the following entries:

name: App
version: 0.0.1
description: An absolute bare-bones web app.
environment:
  sdk: '>=1.0.0 <2.0.0'
dependencies:
  bootjack: any
  browser: 0.10.0+1
  intl: any

And the folder App/packages/intl exists with a bunch of dart files including intl.dart. Please advise.

Dejas
  • 3,511
  • 4
  • 24
  • 36

0 Answers0