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

Cannot include directory of google protobuf files #25

Closed
netdragonboberb opened this issue May 16, 2017 · 1 comment
Closed

Cannot include directory of google protobuf files #25

netdragonboberb opened this issue May 16, 2017 · 1 comment

Comments

@netdragonboberb
Copy link

netdragonboberb commented May 16, 2017

On Windows.. If we try to use google's timestamp.proto, we have to copy the google directory from the contents of C:\Users\USER_NAME.nuget\packages\google.protobuf.tools\3.2.0\tools\ into the C:\Path\To\Proto directory containing MyFile.proto
That .proto file has an import like so:
import "google/protobuf/timestamp.proto";

That's a problem b/c although there's a workaround to copy the google directory over we have to tell git to ignore it so it isn't checked in, and protobuf.tools may be updated at a later date, meaning manually updating that directory, just for testing with grpcc.

Here is the command line I tried (and many similar variants):

C:\Path\To\Proto>grpcc --proto ./MyFile.proto --address 127.0.0.1:12345 -i -d "C:\Users\USER_NAME.nuget\packages\google.protobuf.tools\3.2.0\tools"
TypeError: Cannot read property 'ns' of null
at Object.load (C:\Users\USER_NAME\AppData\Roaming\npm\node_modules\grpcc\node_modules\grpc\src\node\index.js:152:28)
at createClient (C:\Users\USER_NAME\AppData\Roaming\npm\node_modules\grpcc\lib\index.js:16:21)
at Object. (C:\Users\USER_NAME\AppData\Roaming\npm\node_modules\grpcc\bin\grpcc.js:30:3)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.runMain (module.js:604:10)
at run (bootstrap_node.js:390:7)

As mentioned, simply copying "google" over to C:\Path\To\Proto worked fine.

@njpatel
Copy link
Owner

njpatel commented Oct 20, 2017

--directory should help with this - please reopen the issue if it doesn't - thanks!

@njpatel njpatel closed this as completed Oct 20, 2017
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

2 participants