-
Notifications
You must be signed in to change notification settings - Fork 248
Cannot serve application with angular.dart 0.13 #1270
Comments
I can't reproduce the error here. What version of the dart-sdk are you using? Also, shadow_dom has been replaced by web_components. Depending on shadow_dom may prevent certain dependencies from updating. See http://pub.dartlang.org/packages/shadow_dom |
I'm using dart-sdk 1.5.3. I replaced shadow_dom with web_components, did Here's complete output of
|
Could you post the output of |
|
Thanks. Deps look good too. Could you pastebin your pubspec.yaml? I'm wondering why the "in" in the "- web/views/in.html" line is bold? Other than that I'm out of suggestions. I made an empty directory with a web subdir, pasted your pubspec.yaml as above and ran |
I looked at |
It is from code_transformers package imported by di which in turn is imported by the file you mentioned. |
Here is the code_transformers file in question: There are certain assumptions about SdkDirectory with relation to the dart executable accessed through Platform.executable. You can fix it by adding appropriate symlinks or even better pass dart_sdk argument to the angular transformer as follows:
|
I'm using both Windows and Ubuntu (dart docker image) so it will not work with a siningle hardcoded path in pubspec.yaml and I don't want to maintain two versions of pubspec.yaml. @rkirov "You can fix it by adding appropriate symlinks" |
I run this code in the Docker file I guess the comment with symlinks means that you can create symlinks so that the Dart SDK can be reached on all systems by the same path. |
@zoechi Thanks! Transforming the path in pubspec.yaml during build would work for me too if I didn't have to support development on OSX too (forgot to mention that in the original post). If I put a path in pubspec.yaml then development on both OSX and Windows will not work. But I have it working now. I did not add anything to pubspec.yaml, instead I added this line to the Dockerfile:
|
Nice, thanks for the info! |
For future reference, with homebrew on mac with dart 1.8.0, I had to do following: #notetoself |
We've put these lines in our
and then symlinked with It would, however, be nice to override the configuration with e.g. an environment variable. Could angular perhaps respect |
@markuswustenberg I think it is enough to either do the symlink or put the path in pubspec.yaml. You should not have to do both. Also I don't think it is an angular specific issue. If you look up this thread were @rkirov linked the code that probes for the sdk path, it seems to not be a part of angular (it was by reading this code I figured out where to put the symlink). You might want to star these issues which I think are closer to the root cause: https://code.google.com/p/dart/issues/detail?id=21225 |
@jonaskello Yeah, sorry, I forgot to add that we are running in multiple environments and we've settled for I didn't realize it's not an Angular-specific issue, thanks for the pointers. |
Should be fixed in |
Hello,
today I've upgraded to angular.dart 0.13. I cannot serve my application because of "Illegal argument(s): sdkDirectory must be provided." error which occures after running "pub serve". My pubspec.yaml:
The text was updated successfully, but these errors were encountered: