dart-lang / homebrew-dart

Dart team's official tap for homebrew.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pub build (transformers) unable to infer dart-sdk location.

bgourlie opened this issue · comments

I'm attempting to run the angular transformer on a project and I get 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.

After a bit of researching, I believe this is because pub cannot infer the location of the dart-sdk due to where the brew formula is putting files.

Yeah, that's a known issue :( Seems to also happen with Debian (.deb) installs.

See also:

https://code.google.com/p/dart/issues/detail?id=21783

and

https://code.google.com/p/dart/issues/detail?id=21225

Going to close this as a dupe of https://code.google.com/p/dart/issues/detail?id=21225

Thanks again for the report!

@sethladd Just noticed this: https://code.google.com/p/dart/source/detail?r=42275

Not sure if it addresses this particular issue, but looks promising (not home so I can't test myself).

Yup! Hopefully it works :)

What's the solution to this?
What do I do?
"pubspec.yaml:Error loading transformer: Invalid arguments(s): sdkDirectory must be provided."
in pubspec.yaml should I do something like add:

sdkDirectory: /Applications/dart/dart-sdk/

?

(I tried that and it doesn't work... I don't know the syntax of whatever it would be)