Issue
I’m writing a new Angular.dart 1.0 app, and upon building, pub is giving me the following error:
Loading angular transformers...
Error on line 15, column 3 of pubspec.yaml: Error loading transformer: Invalid arguments(s): sdkDirectory must be provided.
I had an Angular.dart app written against 0.14 that didn’t require this. I also went to look at the Angular.dart tutorial and there was no mention of this setting. Having to actually specify it makes CI tricky. Since when was this required, and is there a way to avoid specifying it in pubspec.yaml
(environment variable, for example?)
Solution
Update
Should be fixed in code_transformers
0.2.3+2 (see http://dartbug.com/21225)
Old
See https://github.com/angular/angular.dart/issues/1270#issuecomment-64967674
If you create a symlink
ln -s /usr/lib/dart /usr/lib/dart/bin/dart-sdk
then you don’t need the sdkDirectory
in the transformer setting in the pubspec.yaml
file.
This is very annoying. I also think that an environment variable would be the best solution, but seems this is not supported.
Answered By – Günter Zöchbauer
Answer Checked By – Mildred Charles (FlutterFixes Admin)