> dart bin/apigen.dart \
--discovery-file=urlshortener.json \
--client-file-name=urlshortener \
--output-dir=urlshortener
Unhandled exception:
Could not import "package:streamy/generator.dart" from "file:///usr/local/home/aam/dart/streamy-dart/bin/apigen.dart": Could not resolve a package location for base at file:///usr/local/google/home/aam/dart/streamy-dart/bin/apigen.dart
null
That sounds easy to fix - you need to run pub get first.
But then the command seems to be outdated as it refers to outdated options.
However even after you update parameters, you still get an error:
Transform StreamyYaml on streamy|lib/raw.streamy.yaml threw error: 'package:streamy/generator/ir.dart': error: line 140 pos 25: redirection constructor 'TypeRef' must be const
const TypeRef.any() : this('any');
^
You get the same error by simply running pub build:
$ pub build
Loading source assets...
Loading smoke/src/default_transformer and streamy transformers... (1.0s)
Building streamy...
Build error:
Transform StreamyYaml on streamy|lib/raw.streamy.yaml threw error: 'package:streamy/generator/ir.dart': error: line 140 pos 25: redirection constructor 'TypeRef' must be const
const TypeRef.any() : this('any');
^
That sounds easy to fix - you need to run
pub get
first.But then the command seems to be outdated as it refers to outdated options. However even after you update parameters, you still get an error:
You get the same error by simply running
pub build
: