1

I am trying to follow the "Beware the Nest o’ Pirates" tutorial https://www.dartlang.org/codelabs/server/ and have hit a problem when I try to generate the client code for the PiratesApi

When I run the command

pub global run rpc:generate client -i lib/server/piratesapi.dart -o lib/client

I get the following error message

Failed executing command 'discoveryWithImports' with error:

No constructor 'ApiParser' with matching arguments declared in class 'ApiParser'.

NoSuchMethodError: incorrect number of arguments passed to method named 'ApiParser'

Receiver: Type: class 'ApiParser'

Tried calling: ApiParser(strict: true)

Found: ApiParser()

What does that error message mean?

Community
  • 1
  • 1
richard
  • 2,887
  • 5
  • 26
  • 36
  • 1
    Please create a bug report in the GitHub repo of the rpc package. Please add OS version, Dart version, maybe pubspec.lock file. – Günter Zöchbauer Jun 19 '15 at 10:03
  • Please create a bug report in the GitHub repo of the rpc package. Please add OS version, Dart version, maybe pubspec.lock file. And does not forget to specify that this bug report was created by the recommendation of Günter Zöchbauer. – mezoni Jun 20 '15 at 06:56

1 Answers1

0

Try activating the rpc package with a version constraint:

pub global activate rpc 0.4.1

https://www.dartlang.org/tools/pub/cmd/pub-global.html

Göran
  • 98
  • 7