Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not make proto path relative: protos/*.proto: No such file or directory #516

Open
pcimring opened this issue Apr 23, 2023 · 4 comments

Comments

@pcimring
Copy link

pcimring commented Apr 23, 2023

Hi

I'm something of a newcomer to gRPC in general, as well as this plugin and Docker :)

I downloaded the Docker image to my MacBook (as per the Readme) and attempted to start it:

docker run pseudomuto/protoc-gen-do

But I get:

Could not make proto path relative: protos/*.proto: No such file or directory

Any advice? Am I missing something here?

Thanks

@ismailseyfi
Copy link

I have the same issue with Mac.

@a-mironenko-dataart
Copy link

@pcimring @ismailseyfi The trick is to mount your files to a place inside the docker container you're running using the -v flag. So, assuming I'm in a directory with some file.proto:

❯$ ls 
file.proto

I'd run this:

docker run --rm -v ./docs:/out -v ./:/protos pseudomuto/protoc-gen-doc

... to generate docs in the ./docs subdirectory, like this:

❯$ tree 
.
├── doc
│   ├── index.html
└── file.proto

Hope it helps

@cctyl
Copy link

cctyl commented Sep 6, 2023

@pcimring @ismailseyfi The trick is to mount your files to a place inside the docker container you're running using the -v flag. So, assuming I'm in a directory with some file.proto:

❯$ ls 
file.proto

I'd run this:

docker run --rm -v ./docs:/out -v ./:/protos pseudomuto/protoc-gen-doc

... to generate docs in the ./docs subdirectory, like this:

❯$ tree 
.
├── doc
│   ├── index.html
└── file.proto

Hope it helps

If my .proto file is not in the same directory (because our project’s proto file directory corresponds to the package), and there is an uncertain hierarchical directory structure, how should I modify this command?

@CaetanoJS
Copy link

@pcimring @ismailseyfi any updates about this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants