64918

Angular 2 (4.0.0) Dart transformers not work - Unsupported operation: Using the 'angular2'

Question:

Dart - 1.24.2

Angular - 4.0.0

Chromium - 45.0.2454.104

pubspec.yaml

name: Test description: A web app that uses AngularDart Components version: 0.0.1 #homepage: https://www.example.com #author: serhii <email@example.com> environment: sdk: '>=1.24.0 <2.0.0' dependencies: angular: ^4.0.0 angular_components: ^0.8.0 dev_dependencies: browser: ^0.10.0 dart_to_js_script_rewriter: ^1.0.1 transformers: - angular: entry_points: - web/applications/courier/courier.dart - dart_to_js_script_rewriter

Chromium output:

package:angular/src/platform/bootstrap.dart:107 Exception: Unsupported operation: Using the 'angular2' transformer is required. Please see https://webdev.dartlang.org/angular/tutorial for setup instructions, and ensure your 'pubspec.yaml' file is configured to invoke the 'angular2' transformer on your application's entry point.

If i build this - all is ok, if i serve this (pub serve) - all is ok but i need it to work in Chromium. Please help!

Answer1:

Make sure your entrypoint parameter is correct (path and file):

transformers: - angular: entry_points: - web/applications/courier/courier.dart

Had the very same error after renaming my entry_point file and didn't update pubspec.yaml.

Recommend

  • Import Protobuf generated classes using Gradle in IntelliJ
  • How to use Flot canvas plugin
  • Very basic javascript function call
  • The required anti-forgery cookie “__RequestVerificationToken” is not present. MVC 5
  • PySpark Yarn Application fails on groupBy
  • XGBOOST - DMATRIX
  • Accessing 3rd level of JSON with Angular ng-repeat
  • What do I do with this error when I run tests in rails?
  • How to load Q library with Require.js?
  • Slicing an SPA into several components and use AngularJS
  • to implement a spinner in angular2+
  • Unzip archive in .Net CORE 1.0
  • How to skip require in ruby?
  • C# fibonacci function returning errors
  • Saving image to sd with current date and time in name doesn't work
  • How to get current document uri in XSLT?
  • Convert Type Decimal to Hex (string) in .NET 3.5
  • Android application: how to use the camera and grab the image bytes?
  • What is the purpose of TaskExecutor in spring?
  • How to revert to previous XCode version?
  • Unable to install Git-core+svn by MacPorts
  • How do I exclude a dependency in provided scope when running in Maven test scope?
  • How to get Eclipse Oxygen to run on Java 9
  • How do I access an unhandled exception in an MVC Error view?
  • Mysterious problem with floating point in LISP - time axis generation
  • Email verification using google app script and google forms
  • Yii2: Config params vs. const/define
  • Meteor helpers not available in Angular template
  • Email format validation in mvc3 view
  • Get object from AWS S3 as a stream
  • sending/ receiving email in Java
  • 0x202A in filename: Why?
  • Easiest way to encapsulate a HTML5 webpage into an android app?
  • Busy indicator not showing up in wpf window [duplicate]
  • costura.fody for a dll that references another dll
  • Observable and ngFor in Angular 2
  • How to Embed XSL into XML
  • UserPrincipal.Current returns apppool on IIS
  • Conditional In-Line CSS for IE and Others?
  • java string with new operator and a literal