google / google/protobuf.dart

Error: Could not resolve the package 'protoc_plugin' in 'package:protoc_plugin/protoc.dart'.

Open
#428 50 comments 1 reaction 0 assignees View on GitHub
Windows
Dominant language
Dart
Stars
572
Forks
196
Avg merge
1h 59m
Merged PRs (30d)
2

Description

Tried to generated some dart code from a .proto file, got this.

Error: Could not resolve the package 'protoc_plugin' in 'package:protoc_plugin/protoc.dart'.
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/protoc_plugin-19.1.0/bin/protoc_plugin.dart:7:8: Error: Not found: 'package:protoc_plugin/protoc.dart'
import 'package:protoc_plugin/protoc.dart';
^
/D:/flutter/.pub-cache/hosted/pub.dartlang.org/protoc_plugin-19.1.0/bin/protoc_plugin.dart:10:3: Error: Method not found: 'CodeGenerator'.
CodeGenerator(stdin, stdout).generate();
^^^^^^^^^^^^^
--dart_out: protoc-gen-dart: Plugin failed with status code 254.

My env:
protoc 3.13.0
dartsdk 2.10.2
protoc_plugin 19.1.0

I tried to launch this command: `protoc --proto_path=proto --dart_out=build/gen employee.proto`

Got dart bin path, protoc path and protoc_plugin in my path

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.