loopbackio / loopback4-extension-grpc

gRPC Extension for LoopBack 4
Other
18 stars 8 forks source link

Proto files compile error after extension is installed over NPM #27

Closed VMois closed 6 years ago

VMois commented 6 years ago

Description/Steps to reproduce

After installing loopback4-extension-grpc I have a problem with compiling .proto files to .ts because folder "compilers" with all necessary binaries don't exist after extension installation over NPM.

How to reproduce:

  1. Install grpc extension in new lb4 project npm install @loopback/grpc
  2. Follow instruction in main README to setup basic grpc component
  3. Try to start app, it will throw you this error:
    /bin/sh: 1: /home/vmois/Projects/loopback4/grpc-testing/node_modules/@loopback/grpc/compilers/linux/bin/protoc: not found
    Unable to start application: Error: Command failed: /home/vmois/Projects/loopback4/grpc-testing/node_modules/@loopback/grpc/compilers/linux/bin/protoc --plugin=protoc-gen-ts=/home/vmois/Projects/loopback4/grpc-testing/node_modules/.bin/protoc-gen-ts --ts_out service=true:src/controllers -I src/controllers src/controllers/grpc.proto
    /bin/sh: 1: /home/vmois/Projects/loopback4/grpc-testing/node_modules/@loopback/grpc/compilers/linux/bin/protoc: not found
  4. Check in node_modules/@loopback/grpc, that compilers folder doesn't exist.
  5. If you manualy copy folder compilers from loopback4-extension-grpc repo to your node_modules/@loopback/grpc it works perfectly. Problem is in missing compilers folder.

Expected result

compilers folder must exist after NPM installation. Fastest way is to add compilers to npm. What do you think?

raymondfeng commented 6 years ago

Once we land #28, I'll publish a new version to npm to include compilers.

In the long run, we might have to find a better way.

VMois commented 6 years ago

@raymondfeng Thanks. I agree with you.