tgrospic / rnode-grpc-js

RNode gRPC/HTTP API generator for Nodejs and the browser
https://tgrospic.github.io/rnode-grpc-js/
MIT License
9 stars 6 forks source link

not found grpc_tools_node_protoc #3

Closed zsluedem closed 5 years ago

zsluedem commented 5 years ago
$ ./node_modules/.bin/rnode-grpc --rnode-version dev
RNode gRPC versions { 'rnode-version': 'dev', 'grpc-web-version': '1.0.6' }
Startinmg downloads...
Downloading https://github.com/grpc/grpc-web/releases/download/1.0.6/protoc-gen-grpc-web-1.0.6-darwin-x86_64
Downloading https://raw.githubusercontent.com/rchain/rchain/dev/models/src/main/protobuf/CasperMessage.proto
Downloading https://raw.githubusercontent.com/rchain/rchain/dev/models/src/main/protobuf/DeployServiceCommon.proto
Downloading https://raw.githubusercontent.com/rchain/rchain/dev/models/src/main/protobuf/DeployServiceV1.proto
Downloading https://raw.githubusercontent.com/rchain/rchain/dev/models/src/main/protobuf/ProposeServiceCommon.proto
Downloading https://raw.githubusercontent.com/rchain/rchain/dev/models/src/main/protobuf/ProposeServiceV1.proto
Downloading https://raw.githubusercontent.com/rchain/rchain/dev/models/src/main/protobuf/RhoTypes.proto
Downloading https://raw.githubusercontent.com/rchain/rchain/dev/models/src/main/protobuf/ServiceError.proto
Downloading https://raw.githubusercontent.com/rchain/rchain/dev/node/src/main/protobuf/repl.proto
Downloading https://raw.githubusercontent.com/scalapb/ScalaPB/master/protobuf/scalapb/scalapb.proto
Generating JS files...
(node:49188) UnhandledPromiseRejectionWarning: Error: not found: grpc_tools_node_protoc
    at getNotFoundError (/Users/willqiu/work/pull/playq/node_modules/which/which.js:13:12)
    at F (/Users/willqiu/work/pull/playq/node_modules/which/which.js:68:19)
    at E (/Users/willqiu/work/pull/playq/node_modules/which/which.js:80:29)
    at /Users/willqiu/work/pull/playq/node_modules/which/which.js:89:16
    at /Users/willqiu/work/pull/playq/node_modules/isexe/index.js:42:5
    at /Users/willqiu/work/pull/playq/node_modules/isexe/mode.js:8:5
    at FSReqCallback.oncomplete (fs.js:158:21)
(node:49188) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:49188) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
zsluedem commented 5 years ago

export PATH=$PATH:$(pwd)/node_modules/.bin solved my problem

tgrospic commented 5 years ago

Hi Will! It seems that you don't have peer dependencies installed. grpc_tools_node_protoc compiles with grpc-tools to generate all js files. This will install both. npm install --save-dev grpc-tools protobufjs

grpc-tools uses native code so possibility is that compilation is not successful. You can try npm rebuild inside the project to recompile native libs.

tgrospic commented 5 years ago

This should not be needed. I'll fix a bug. Thanks for reporting.

tgrospic commented 5 years ago

With version v0.7.0 this should be fixed.