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

npm install grpc build from source fails #922

Closed
gr-butler opened this issue Jun 20, 2019 · 16 comments
Closed

npm install grpc build from source fails #922

gr-butler opened this issue Jun 20, 2019 · 16 comments

Comments

@gr-butler
Copy link

Having the issue on Fedora 29

Node: 10.16.0
npm: 6.9.0

Console output (abridged):

npm install grpc

[email protected] install /home/gary/Source/storex_graphql_server/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(400): https://node-precompiled-binaries.grpc.io/grpc/v1.21.1/node-v64-linux-x64-glibc.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/home/gary/Source/storex_graphql_server/node_modules/grpc/build'
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/avl/avl.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/backoff/backoff.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_args.o

...

CXX(target) Release/obj.target/grpc/deps/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.o
../deps/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc: In function ‘grpc_grpclb_request* grpc_grpclb_request_create(const char*)’:
../deps/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc:70:10: error: ‘char* strncpy(char*, const char*, size_t)’ specified bound 128 equals destination size [-Werror=stringop-truncation]
strncpy(req->initial_request.name, lb_service_name,

        GRPC_GRPCLB_SERVICE_NAME_MAX_LENGTH);
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make: *** [grpc.target.mk:495: Release/obj.target/grpc/deps/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.o] Error 1
make: Leaving directory '/home/gary/Source/storex_graphql_server/node_modules/grpc/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 5.1.11-200.fc29.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/home/gary/Source/storex_graphql_server/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/home/gary/Source/storex_graphql_server/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64"
gyp ERR! cwd /home/gary/Source/storex_graphql_server/node_modules/grpc
gyp ERR! node -v v10.16.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/gary/Source/storex_graphql_server/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/gary/Source/storex_graphql_server/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/home/gary/Source/storex_graphql_server/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:982:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Linux 5.1.11-200.fc29.x86_64
node-pre-gyp ERR! command "/usr/bin/node" "/home/gary/Source/storex_graphql_server/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /home/gary/Source/storex_graphql_server/node_modules/grpc
node-pre-gyp ERR! node -v v10.16.0
node-pre-gyp ERR! node-pre-gyp -v v0.13.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/home/gary/Source/storex_graphql_server/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/gary/Source/storex_graphql_server/node_modules/grpc/src/node/extension_binary/node-v64-linux-x64-glibc --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64' (1)
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/gary/.npm/_logs/2019-06-20T08_52_53_291Z-debug.log

@mastersingh24
Copy link

It's odd that you could not download the prebuilt binaries ... I just did so using Fedora 29 and Node 10.16.

In any case, there still seems to be a residual issue compiling gRPC-core using gcc/g++ 8.x.

You can work around this by setting the CXXFLAGS environment variable:
export CXXFLAGS=-Wno-error

@anubhav25
Copy link

anubhav25 commented Jul 22, 2019

:~/Desktop/New/Anubhav$ npm install grpc@1.20.2 -S
[email protected] install /home/anubhav/Desktop/New/Anubhav/node_modules/@firebase/firestore/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.20.0/node-v72-linux-x64-glibc.tar.gz
node-pre-gyp WARN Pre-built binaries not found for grpc@1.20.0 and [email protected] (node-v72 ABI, glibc) (falling back to source compile with node-gyp)

Hi,
I am facing the same issue but the problem in my case is I think while trying yo install grpc version 1.20.2 the node-pre-gyp is downloding libraries for 1.20.0

@rajshah
Copy link

rajshah commented Oct 9, 2019

I am facing the same problem.
`npm info lifecycle [email protected]~install: [email protected]

[email protected] install /Users/user/Documents/codebase/project-name/node_modules/@firebase/firestore/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | darwin | x64
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp info check checked for "/Users/user/Documents/codebase/project-name/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown/grpc_node.node" (not found)
node-pre-gyp http GET https://node-precompiled-binaries.grpc.io/grpc/v1.20.0/node-v72-darwin-x64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v72 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error self signed certificate in certificate chain
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /usr/local/opt/python/libexec/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:297:12)
gyp ERR! stack at ChildProcess.emit (events.js:203:13)
gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
gyp ERR! stack at Socket. (internal/child_process.js:430:11)
gyp ERR! stack at Socket.emit (events.js:203:13)
gyp ERR! stack at Pipe. (net.js:588:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/Cellar/node/12.6.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=/Users/user/Documents/codebase/project-name/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/user/Documents/codebase/project-name/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown" "--napi_version=4" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72" "--python=/usr/local/opt/python/libexec/bin/python"
gyp ERR! cwd /Users/user/Documents/codebase/project-name/node_modules/@firebase/firestore/node_modules/grpc
gyp ERR! node -v v12.6.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/12.6.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/Users/user/Documents/codebase/project-name/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/user/Documents/codebase/project-name/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72 --python=/usr/local/opt/python/libexec/bin/python' (1)
node-pre-gyp ERR! stack at ChildProcess. (/Users/user/Documents/codebase/project-name/node_modules/@firebase/firestore/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:203:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Darwin 18.6.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/12.6.0/bin/node" "/Users/user/Documents/codebase/project-name/node_modules/@firebase/firestore/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /Users/user/Documents/codebase/project-name/node_modules/@firebase/firestore/node_modules/grpc
node-pre-gyp ERR! node -v v12.6.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/12.6.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/Users/user/Documents/codebase/project-name/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/user/Documents/codebase/project-name/node_modules/@firebase/firestore/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown --napi_version=4 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72 --python=/usr/local/opt/python/libexec/bin/python' (1)
npm info lifecycle [email protected]~install: Failed to exec install script
npm timing action:install Completed in 2405ms
npm timing stage:rollbackFailedOptional Completed in 784ms
npm timing stage:runTopLevelLifecycles Completed in 46436ms
npm WARN [email protected] requires a peer of [email protected] - 3 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of popper.js@^1.14.7 but none is installed. You must install peer dependencies yourself.
npm WARN @firebase/[email protected] requires a peer of @firebase/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @firebase/[email protected] requires a peer of @firebase/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @firebase/[email protected] requires a peer of @firebase/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @firebase/[email protected] requires a peer of @firebase/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @firebase/[email protected] requires a peer of @firebase/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @firebase/[email protected] requires a peer of @firebase/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @firebase/[email protected] requires a peer of @firebase/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @firebase/[email protected] requires a peer of @firebase/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm timing npm Completed in 47669ms

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2019-10-09T19_40_13_906Z-debug.log
`

@Infl1ght
Copy link

Infl1ght commented Nov 7, 2019

Downgrading Node.js from 12 to 10 works as well.

@peetyo
Copy link

peetyo commented Dec 1, 2019

Downgrading Node.js from 12 to 10 works as well.

Thank you! I've run about 25 different commands today trying to install the dependencies for a project on a new machine with a fresh Node.js install (v12). Going back to v10 worked like a charm.

@SyamalaSruthi
Copy link

Downgrading Node.js from 12 to 10 works as well.

This worked for me as well, downloaded to node-v10.17.0 npm 6.11.3

@arinthros
Copy link

This error showed up for me in node 12.14.1 and 13.5.0. Downgrading to 10.18.0 resolved the error.

@shaiTheGuy
Copy link

Upgrading grpc to 1.24.2 seems to solve this problem, even with node 12.14.1

@sprotznock85
Copy link

late but anyone who must use needle for downloading:

node-pre-gyp WARN Using needle for node-pre-gyp https download

can fix this issue by installing request first:

npm install request

Then, install grpc as usual:

npm install grpc

This is because node-pre-gyp has the following code snippet during install process:

try {
  http_get.impl = require('request');
  http_get.type = 'request';
  log.warn("Using request for node-pre-gyp https download");
} catch (e) {
  http_get.impl = require('needle');
  http_get.type = 'needle';
  log.warn("Using needle for node-pre-gyp https download");
}

So request is not used because any package.json does not have request.
Pre installing request fixes this issue for me.
Important to say that all cafile options must be removed from any npm config
ssl can be set to true again as well as NODE_TLS_REJECT_UNAUTHORIZED to true.

@koraysels
Copy link

I have the same issue and cannot downgrade to node 10 because some packages rely on 12. I've had no issues in the past I dont understand why this is happening all of a sudden..

huan added a commit to wechaty/grpc that referenced this issue Apr 29, 2020
@huan
Copy link
Contributor

huan commented Apr 29, 2020

@sprotznock85 Amazing, your solution of npm install request solved my problem with Node@12 & [email protected]

node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v72 ABI, glibc) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error bad download 

Related fail logs before doing this: https://github.com/Chatie/grpc/runs/628529052?check_suite_focus=true#step:6:646

@FredOliveiraSantos
Copy link

late but anyone who must use needle for downloading:

node-pre-gyp WARN Using needle for node-pre-gyp https download

can fix this issue by installing request first:

npm install request

Then, install grpc as usual:

npm install grpc

This is because node-pre-gyp has the following code snippet during install process:

try {
  http_get.impl = require('request');
  http_get.type = 'request';
  log.warn("Using request for node-pre-gyp https download");
} catch (e) {
  http_get.impl = require('needle');
  http_get.type = 'needle';
  log.warn("Using needle for node-pre-gyp https download");
}

So request is not used because any package.json does not have request.
Pre installing request fixes this issue for me.
Important to say that all cafile options must be removed from any npm config
ssl can be set to true again as well as NODE_TLS_REJECT_UNAUTHORIZED to true.

This worked for me as well. Thank you!

@Alabate
Copy link

Alabate commented May 7, 2020

We stared experiencing random CI errors like some of you, a few weeks ago

node-pre-gyp WARN Pre-built binaries not installable for [email protected] and [email protected] (node-v72 ABI, glibc) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error bad download 

And the solution of installing request before starting our npm install works. Thank you a lot for that @sprotznock85. But that's a hack and request is deprecated since february 2020, so we would like to understand and find a long term solution. Did you @sprotznock85 or someone else understand why downloading with request work and not with needle ?

mhoeger added a commit to Azure/azure-functions-nodejs-worker that referenced this issue May 29, 2020
mhoeger added a commit to Azure/azure-functions-nodejs-worker that referenced this issue May 29, 2020
mhoeger added a commit to Azure/azure-functions-nodejs-worker that referenced this issue May 29, 2020
* v1.2.2

* Updating devops images

* Workaround to grpc/grpc-node#922
mhoeger added a commit to Azure/azure-functions-nodejs-worker that referenced this issue May 29, 2020
* Node.js worker v2.0.3

* update azure-pipelines

* adding workaround for issue grpc/grpc-node#922

* apply bugfix to windowsg
@Bhagatameya21
Copy link

late but anyone who must use needle for downloading:

node-pre-gyp WARN Using needle for node-pre-gyp https download

can fix this issue by installing request first:

npm install request

Then, install grpc as usual:

npm install grpc

This is because node-pre-gyp has the following code snippet during install process:

try {
  http_get.impl = require('request');
  http_get.type = 'request';
  log.warn("Using request for node-pre-gyp https download");
} catch (e) {
  http_get.impl = require('needle');
  http_get.type = 'needle';
  log.warn("Using needle for node-pre-gyp https download");
}

So request is not used because any package.json does not have request.
Pre installing request fixes this issue for me.
Important to say that all cafile options must be removed from any npm config
ssl can be set to true again as well as NODE_TLS_REJECT_UNAUTHORIZED to true.

Can u help me?? I need help in same issue i did try ur solution didnt quite work out for me
Thanks in Advance..Sorry m kinda new in JS
Sorry for my bad english

su-chang added a commit to su-chang/grpc that referenced this issue Mar 9, 2021
* fix: correct spell mistakes

* 0.13.10

* This is a breaking change!

* change python proto package name

* update the version of chatie_grpc

* try to install request (grpc/grpc-node#922 (comment))

* 0.15.2

* add grpc debug client link

* update setup.py to fix pypi bug (wechaty#59)

* update setup to fix pypi bug

* change chatie-grpc generated dir

* 0.15.2

* 0.15.3 (wechaty#60)

* keep the package dir name in site-packages as `chatie_grpc` (wechaty#62)

* 0.15.3

* keep package name as chatie_grpc not chatie-grpc

* 0.15.4 (wechaty#63)

* deploy release jar (wechaty#61)

* fix maven,deploy jar to center oss

* fix maven,deploy jar to center oss

* add java to README.md

* use better relative path for proto_path (zxh0/vscode-proto3#31 (comment))

* 0.15.5

* update pypi install_requires config (wechaty#64)

* 0.15.4

* add install_requires

* 0.15.5

* 0.15.6

* add NOTICE

* 0.13.10

* 0.16.0

* 0.16.1

* Bump @chatie/tsconfig from 0.8.0 to 0.10.1 (wechaty#70)

Bumps [@chatie/tsconfig](https://github.com/Chatie/tsconfig) from 0.8.0 to 0.10.1.
- [Release notes](https://github.com/Chatie/tsconfig/releases)
- [Commits](https://github.com/Chatie/tsconfig/commits)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Bump grpc_tools_node_protoc_ts from 2.5.11 to 4.0.0 (wechaty#69)

Bumps [grpc_tools_node_protoc_ts](https://github.com/agreatfool/grpc_tools_node_protoc_ts) from 2.5.11 to 4.0.0.
- [Release notes](https://github.com/agreatfool/grpc_tools_node_protoc_ts/releases)
- [Commits](agreatfool/grpc_tools_node_protoc_ts@v2.5.11...v4.0.0)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Bump @chatie/git-scripts from 0.2.5 to 0.6.2 (wechaty#68)

Bumps [@chatie/git-scripts](https://github.com/Chatie/git-scripts) from 0.2.5 to 0.6.2.
- [Release notes](https://github.com/Chatie/git-scripts/releases)
- [Commits](https://github.com/Chatie/git-scripts/commits)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Update betterproto (wechaty#46)

* specify python v3

* 0.16.2

* add php rpc (wechaty#76)

* add php grpc

* update usage

* update usage

* update usage

* update

* update usage

* add php rpc

* add PHP Grpc & maintainers

* 0.16.3

* add all codeowners for languages

* 0.16.4

* Bump @chatie/eslint-config from 0.8.1 to 0.12.1 (wechaty#75)

Bumps [@chatie/eslint-config](https://github.com/Chatie/eslint-config) from 0.8.1 to 0.12.1.
- [Release notes](https://github.com/Chatie/eslint-config/releases)
- [Commits](https://github.com/Chatie/eslint-config/commits)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* fix eslint

* 0.16.5

* add php action (wechaty#78)

* add php action

* add php action

* add php action

* add php action

* add php action

* add php action

* add php action

* add php action

* add php action

* add php action

* add php action

* add php action

* tune layout for source code

* Update README.md

* v0.17

* fix to v0.17

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* fix github url

* 0.16.2

* 0.17.1

* add dirty rpc function definition for sync data (wechaty#79)

* add dirty rpc function definition for sync data

* try to fix tests

* add rpc roomMemberPayloadDirty

* add dirty event type

* revise code according to comments

* modify dirty methods and event

* try to fix build

* modify code according to review

* fix build

* hope this is the final build fix

* this must be the final final build fix

* fix proto naming convention

* change property name according to comment

* Update package.json

* Update package.json

Co-authored-by: Huan (李卓桓) <[email protected]>

* add contact phone rpc call definition (wechaty#80)

* add more methods related to new wechaty-puppept update (wechaty#81)

* add more methods related to new wechaty-puppept update

* fix test

* fix typo and order

* 0.17.3

* fix request structure according to comments

* add phone to contact payload (wechaty#82)

* bump version to publish new changes (wechaty#83)

* add csharp nuget  (wechaty#84)

* proto add csharp namespace

* add  csharp solution

* update

* csharp add  build powshell

* Create csharp.yml

* update csharp.yaml

* update copy.ps1

* add test

* test

* update common.ps1

* test  action args key

* test powshell args

* test github Secrets

* update yaml

* update nuget package as   rohith/publish-nuget@v2

* update version info

* github action add  nuget VERSION_FILE_PATH

* chsarp github action over

* recovery github action

* clear

* update gitgnore

* delete .vs folder

* update README.md for csharp

* README.md update csharp grpc doc

* README.md add nuget introduction

* add file stream and image stream rpc call (wechaty#88)

* add file stream and image stream rpc call

* fix test

* 0.17.5

* add imageType to MessageImageStreamRequest

* add @deprecated to MessageFile and MessageImage rpc

* add change history in readme

* 0.18.0

* Bump grpc_tools_node_protoc_ts from 4.1.5 to 5.0.0 (wechaty#87)

Bumps [grpc_tools_node_protoc_ts](https://github.com/agreatfool/grpc_tools_node_protoc_ts) from 4.1.5 to 5.0.0.
- [Release notes](https://github.com/agreatfool/grpc_tools_node_protoc_ts/releases)
- [Commits](agreatfool/grpc_tools_node_protoc_ts@v4.1.5...v5.0.0)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Bump ts-protoc-gen from 0.12.0 to 0.13.0 (wechaty#86)

Bumps [ts-protoc-gen](https://github.com/improbable-eng/ts-protoc-gen) from 0.12.0 to 0.13.0.
- [Release notes](https://github.com/improbable-eng/ts-protoc-gen/releases)
- [Changelog](https://github.com/improbable-eng/ts-protoc-gen/blob/master/CHANGELOG.md)
- [Commits](improbable-eng/ts-protoc-gen@0.12.0...0.13.0)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Send message stream (wechaty#89)

* add sendFileStream rpc call

* add sendFileStream into puppet server impl

* add readme

* 0.18.1

* change filebox to data with bytes type

* add name attribute into stream request and response

* Fix go ci (wechaty#91)

* Fix go ci

* Update go.yml

* add go_package

* debug github action

* debug github action

* debug github action

* keep the latest betterproto version (wechaty#92)

* Use metadata (wechaty#93)

* use metadata send extra info, remove extra attributes in stream message

* 0.18.2

* use common message to send FileBox

* rename FileBoxMessage to FileBoxChunk

* use data instead of chunk

* 0.18.3

* Update README.md

* Improve stream message (wechaty#95)

* improve stream message definition

* 0.18.4

* change names

* wip...

* normalize name

* 0.18.5

* normalize name

* 0.18.6

* rename request & responses for more robust

* clean name

* 0.18.7

Co-authored-by: Huan LI (李卓桓) <[email protected]>

* Export file box (wechaty#98)

* export filebox from generated ts file

* 0.18.8

* add some stream notices comments

* 0.18.9

* fix file rename

* 0.18.10

* link to wechaty#99

* 0.18.11

* fix go-grpc generate failed (wechaty#101)

* 0.18.12

* fix .net grpc  for the new file file_box.proto and update TargetFramework to  netstandard2.0 (wechaty#104)

* init openapi

* Rename & Add OpenAPI Specification Generator (wechaty#107)

* rename npm name to wechaty-grpc (wechaty#106)

* add grpc http annotations (wip)

* add grpc gateway image

* add swagger info annotation

* make payload dirty restful

* fix name

* add more restful endpoint definitions

* fix streaming methods

* better protoc tools installer script

* clean openapi scripts

* rename src/index -> src/mod

* generate proto js files with annotation

* 0.19.1

* add gRPC Web example

* 0.19.2

* wechaty-grpc v0.20

* 0.20.1

* lint

* check protoc version to make sure >= 3.5 (wechaty#116)

* test ok

* upgrade all deps

* add more node version for testing

* 0.20.2

* use @master version of github actions, enable cache

* install 3rd party protos

* 0.20.3

* fix npm publish

* 0.20.4

* add openApi & proto for export (wechaty#119)

* add openApi & proto for export

* open-api -> openapi

* 0.20.5

* Pypi rename wechaty grpc (wechaty#118)

* follow latest grpc proto annotations & rename

* deprecate merge-rpoto.sh (wechaty#46)

* install third party proto files

* 0.20.5

* install proto by github actions

* 0.20.6

* add cache for pypi install

* 0.20.7

* use abs path for install

* 0.20.8

* explicit python3 & pip3

* 0.20.9

* 0.20.10

* 0.20.11

* sync swagger version to gRPC

* 0.20.12

* compatible with grpc-dynamic-gateway (konsumer/grpc-dynamic-gateway#50)

* cean

* fix

* 0.20.13

* use proto full path & fix openapi

* 0.20.14

* fix python proto path

* 0.20.15

* add openapi link

* 0.20.16

* a workaround to fix issue wechaty#120

* clean

* 0.20.17

* fix name

* 0.20.18

* specify beta version for install

* 0.20.19

Co-authored-by: Huan (李卓桓) <[email protected]>
Co-authored-by: wj-Mcat <[email protected]>
Co-authored-by: 犀利豆 <[email protected]>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: 一路向北 <[email protected]>
Co-authored-by: Yuan Gao <[email protected]>
Co-authored-by: Darren <[email protected]>
Co-authored-by: 小雨 <[email protected]>
Co-authored-by: Chao Fei <[email protected]>
huan added a commit to wechaty/grpc that referenced this issue Mar 17, 2021
* merge master 0.20.19 (#1)

* fix: correct spell mistakes

* 0.13.10

* This is a breaking change!

* change python proto package name

* update the version of chatie_grpc

* try to install request (grpc/grpc-node#922 (comment))

* 0.15.2

* add grpc debug client link

* update setup.py to fix pypi bug (#59)

* update setup to fix pypi bug

* change chatie-grpc generated dir

* 0.15.2

* 0.15.3 (#60)

* keep the package dir name in site-packages as `chatie_grpc` (#62)

* 0.15.3

* keep package name as chatie_grpc not chatie-grpc

* 0.15.4 (#63)

* deploy release jar (#61)

* fix maven,deploy jar to center oss

* fix maven,deploy jar to center oss

* add java to README.md

* use better relative path for proto_path (zxh0/vscode-proto3#31 (comment))

* 0.15.5

* update pypi install_requires config (#64)

* 0.15.4

* add install_requires

* 0.15.5

* 0.15.6

* add NOTICE

* 0.13.10

* 0.16.0

* 0.16.1

* Bump @chatie/tsconfig from 0.8.0 to 0.10.1 (#70)

Bumps [@chatie/tsconfig](https://github.com/Chatie/tsconfig) from 0.8.0 to 0.10.1.
- [Release notes](https://github.com/Chatie/tsconfig/releases)
- [Commits](https://github.com/Chatie/tsconfig/commits)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Bump grpc_tools_node_protoc_ts from 2.5.11 to 4.0.0 (#69)

Bumps [grpc_tools_node_protoc_ts](https://github.com/agreatfool/grpc_tools_node_protoc_ts) from 2.5.11 to 4.0.0.
- [Release notes](https://github.com/agreatfool/grpc_tools_node_protoc_ts/releases)
- [Commits](agreatfool/grpc_tools_node_protoc_ts@v2.5.11...v4.0.0)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Bump @chatie/git-scripts from 0.2.5 to 0.6.2 (#68)

Bumps [@chatie/git-scripts](https://github.com/Chatie/git-scripts) from 0.2.5 to 0.6.2.
- [Release notes](https://github.com/Chatie/git-scripts/releases)
- [Commits](https://github.com/Chatie/git-scripts/commits)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Update betterproto (#46)

* specify python v3

* 0.16.2

* add php rpc (#76)

* add php grpc

* update usage

* update usage

* update usage

* update

* update usage

* add php rpc

* add PHP Grpc & maintainers

* 0.16.3

* add all codeowners for languages

* 0.16.4

* Bump @chatie/eslint-config from 0.8.1 to 0.12.1 (#75)

Bumps [@chatie/eslint-config](https://github.com/Chatie/eslint-config) from 0.8.1 to 0.12.1.
- [Release notes](https://github.com/Chatie/eslint-config/releases)
- [Commits](https://github.com/Chatie/eslint-config/commits)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* fix eslint

* 0.16.5

* add php action (#78)

* add php action

* add php action

* add php action

* add php action

* add php action

* add php action

* add php action

* add php action

* add php action

* add php action

* add php action

* add php action

* tune layout for source code

* Update README.md

* v0.17

* fix to v0.17

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* fix github url

* 0.16.2

* 0.17.1

* add dirty rpc function definition for sync data (#79)

* add dirty rpc function definition for sync data

* try to fix tests

* add rpc roomMemberPayloadDirty

* add dirty event type

* revise code according to comments

* modify dirty methods and event

* try to fix build

* modify code according to review

* fix build

* hope this is the final build fix

* this must be the final final build fix

* fix proto naming convention

* change property name according to comment

* Update package.json

* Update package.json

Co-authored-by: Huan (李卓桓) <[email protected]>

* add contact phone rpc call definition (#80)

* add more methods related to new wechaty-puppept update (#81)

* add more methods related to new wechaty-puppept update

* fix test

* fix typo and order

* 0.17.3

* fix request structure according to comments

* add phone to contact payload (#82)

* bump version to publish new changes (#83)

* add csharp nuget  (#84)

* proto add csharp namespace

* add  csharp solution

* update

* csharp add  build powshell

* Create csharp.yml

* update csharp.yaml

* update copy.ps1

* add test

* test

* update common.ps1

* test  action args key

* test powshell args

* test github Secrets

* update yaml

* update nuget package as   rohith/publish-nuget@v2

* update version info

* github action add  nuget VERSION_FILE_PATH

* chsarp github action over

* recovery github action

* clear

* update gitgnore

* delete .vs folder

* update README.md for csharp

* README.md update csharp grpc doc

* README.md add nuget introduction

* add file stream and image stream rpc call (#88)

* add file stream and image stream rpc call

* fix test

* 0.17.5

* add imageType to MessageImageStreamRequest

* add @deprecated to MessageFile and MessageImage rpc

* add change history in readme

* 0.18.0

* Bump grpc_tools_node_protoc_ts from 4.1.5 to 5.0.0 (#87)

Bumps [grpc_tools_node_protoc_ts](https://github.com/agreatfool/grpc_tools_node_protoc_ts) from 4.1.5 to 5.0.0.
- [Release notes](https://github.com/agreatfool/grpc_tools_node_protoc_ts/releases)
- [Commits](agreatfool/grpc_tools_node_protoc_ts@v4.1.5...v5.0.0)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Bump ts-protoc-gen from 0.12.0 to 0.13.0 (#86)

Bumps [ts-protoc-gen](https://github.com/improbable-eng/ts-protoc-gen) from 0.12.0 to 0.13.0.
- [Release notes](https://github.com/improbable-eng/ts-protoc-gen/releases)
- [Changelog](https://github.com/improbable-eng/ts-protoc-gen/blob/master/CHANGELOG.md)
- [Commits](improbable-eng/ts-protoc-gen@0.12.0...0.13.0)

Signed-off-by: dependabot-preview[bot] <[email protected]>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>

* Send message stream (#89)

* add sendFileStream rpc call

* add sendFileStream into puppet server impl

* add readme

* 0.18.1

* change filebox to data with bytes type

* add name attribute into stream request and response

* Fix go ci (#91)

* Fix go ci

* Update go.yml

* add go_package

* debug github action

* debug github action

* debug github action

* keep the latest betterproto version (#92)

* Use metadata (#93)

* use metadata send extra info, remove extra attributes in stream message

* 0.18.2

* use common message to send FileBox

* rename FileBoxMessage to FileBoxChunk

* use data instead of chunk

* 0.18.3

* Update README.md

* Improve stream message (#95)

* improve stream message definition

* 0.18.4

* change names

* wip...

* normalize name

* 0.18.5

* normalize name

* 0.18.6

* rename request & responses for more robust

* clean name

* 0.18.7

Co-authored-by: Huan LI (李卓桓) <[email protected]>

* Export file box (#98)

* export filebox from generated ts file

* 0.18.8

* add some stream notices comments

* 0.18.9

* fix file rename

* 0.18.10

* link to #99

* 0.18.11

* fix go-grpc generate failed (#101)

* 0.18.12

* fix .net grpc  for the new file file_box.proto and update TargetFramework to  netstandard2.0 (#104)

* init openapi

* Rename & Add OpenAPI Specification Generator (#107)

* rename npm name to wechaty-grpc (#106)

* add grpc http annotations (wip)

* add grpc gateway image

* add swagger info annotation

* make payload dirty restful

* fix name

* add more restful endpoint definitions

* fix streaming methods

* better protoc tools installer script

* clean openapi scripts

* rename src/index -> src/mod

* generate proto js files with annotation

* 0.19.1

* add gRPC Web example

* 0.19.2

* wechaty-grpc v0.20

* 0.20.1

* lint

* check protoc version to make sure >= 3.5 (#116)

* test ok

* upgrade all deps

* add more node version for testing

* 0.20.2

* use @master version of github actions, enable cache

* install 3rd party protos

* 0.20.3

* fix npm publish

* 0.20.4

* add openApi & proto for export (#119)

* add openApi & proto for export

* open-api -> openapi

* 0.20.5

* Pypi rename wechaty grpc (#118)

* follow latest grpc proto annotations & rename

* deprecate merge-rpoto.sh (#46)

* install third party proto files

* 0.20.5

* install proto by github actions

* 0.20.6

* add cache for pypi install

* 0.20.7

* use abs path for install

* 0.20.8

* explicit python3 & pip3

* 0.20.9

* 0.20.10

* 0.20.11

* sync swagger version to gRPC

* 0.20.12

* compatible with grpc-dynamic-gateway (konsumer/grpc-dynamic-gateway#50)

* cean

* fix

* 0.20.13

* use proto full path & fix openapi

* 0.20.14

* fix python proto path

* 0.20.15

* add openapi link

* 0.20.16

* a workaround to fix issue #120

* clean

* 0.20.17

* fix name

* 0.20.18

* specify beta version for install

* 0.20.19

Co-authored-by: Huan (李卓桓) <[email protected]>
Co-authored-by: wj-Mcat <[email protected]>
Co-authored-by: 犀利豆 <[email protected]>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: 一路向北 <[email protected]>
Co-authored-by: Yuan Gao <[email protected]>
Co-authored-by: Darren <[email protected]>
Co-authored-by: 小雨 <[email protected]>
Co-authored-by: Chao Fei <[email protected]>

* feat: add options to FriendshipAddRequest

* 0.20.20

* fix: bug

* fix: add strong type FriendshipAddOptions for FriendshipAddRequest

* fix: rename attr name

* fix: add optional for FriendshipAddOptions

* fix: use google.protobuf.StringValue for optional

* fix: keep hello as string type, and rename inviter_contact_id and inviter_room_id

* 0.21.2

Co-authored-by: Huan (李卓桓) <[email protected]>
Co-authored-by: wj-Mcat <[email protected]>
Co-authored-by: 犀利豆 <[email protected]>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: 一路向北 <[email protected]>
Co-authored-by: Yuan Gao <[email protected]>
Co-authored-by: Darren <[email protected]>
Co-authored-by: 小雨 <[email protected]>
Co-authored-by: Chao Fei <[email protected]>
@eliasffyksen
Copy link

So my issue was that my default compiler was clang-11 (which did not want to play nice), fixed it by doing export CXX=g++.
Btw, I'm running NixOS so might not be the same problem.
Thought I'd just add this here in case anyone else has the same issue

@gabstv
Copy link

gabstv commented Nov 4, 2021

I was able to get it working on node 17 by replacing the grpc package with @grpc/grpc-js, and generating the proto files with the grpc_js option like:

# Generate js
yarn run grpc_tools_node_protoc \
  --js_out=import_style=commonjs,binary:${OUTPUT_DIR} \
  --grpc_out=grpc_js:${OUTPUT_DIR} \
  --plugin=protoc-gen-grpc=./node_modules/.bin/grpc_tools_node_protoc_plugin \
  -I ${PROTO_DIR} \
  ${PROTO_DIR}/*.proto

# Generate ts
yarn run grpc_tools_node_protoc \
  --plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts \
  --ts_out=grpc_js:${OUTPUT_DIR} \
  -I ${PROTO_DIR} \
  ${PROTO_DIR}/*.proto

Also, to make it compile without errors (with typescript), I had to do some generics juggling to use private variables in my services:
agreatfool/grpc_tools_node_protoc_ts#79 (comment)

@murgatroid99 murgatroid99 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests