我正在遵循grpc的Dart快速入门指南。我尝试在Windows 10上生成Dart代码,但收到以下错误:
--dart_out: protoc-gen-dart: The system cannot find the file specified.我已经在path中添加了Pub\Cache\bin,并尝试了GRPC页面中快速入门指南中的命令:
cd grpc-dart/example/helloworld
protoc --dart_out=grpc:lib/src/generated -Iprotos protos/helloworld.proto我也尝试过像这样指定完整路径:
protoc --dart_out=grpc:lib/src/generated -Iprotos protos/helloworld.proto --plugin=protoc-gen-dart=c:\Users\[myself]\AppData\Roaming\Pub\Cache\bin\protoc-gen-dart.bat在这种情况下,我得到以下错误:
--dart_out: protoc-gen-dart: The system cannot find the path specified.你知道我做错了什么吗?我已经成功地为C#和Go生成了代码,但是我不能让它在Dart上工作。
发布于 2019-01-24 16:22:57
我也赢了10个,我也有同样的问题,我解决了这个问题:
C:\Users\[your user name]\AppData\Roaming\Pub\Cache\bin\protoc-gen-dart.batpub global activate protoc_pluginC:\workspace\tools\protoc3.6.1\bin\protoc --plugin=protoc-gen-dart=C:\Users\[your user name]\AppData\Roaming\Pub\Cache\bin\protoc-gen-dart.bat --dart_out=./ ./xxxx.protohttps://stackoverflow.com/questions/53538315
复制相似问题