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

[Node.js] Pre-built binaries not found for grpc@1.2.4 and node@6.9.5 on Windows #11239

Closed
jmdobry opened this issue May 19, 2017 · 19 comments
Closed

Comments

@jmdobry
Copy link

jmdobry commented May 19, 2017

Reported on GoogleCloudPlatform/cloud-functions-emulator#107

@murgatroid99
Copy link
Member

That file definitely exists. And since the error output from trying to download it was "Error: unable to get local issuer certificate", it looks like the problem was on the client side.

@Grsmto
Copy link

Grsmto commented Jun 5, 2017

Windows binaries seem fine but Linux binaries seems to be down I think?!
https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.2.4/node-v57-linux-x64.tar.gz

@murgatroid99
Copy link
Member

We don't have Node 8 binaries because Node 8 just came out. Those will be released soon.

@murgatroid99
Copy link
Member

gRPC 1.3.8 has been published with support for Node 8.

@Oted
Copy link

Oted commented Nov 23, 2017

I am also having issues with this but for different versions, is there a complete list of available binaries per node version? I am currently trying 1.7.2 and node@9.2.0

@murgatroid99
Copy link
Member

We have binaries for Node 9 for grpc 1.7.2. Can you provide the specific error output that you are seeing?

@nooballday
Copy link

nooballday commented Nov 28, 2017

having the same issue while building image in docker. node version v9.0.0
Edit
i updated it to 9.2.0 the error presists.

grpc@1.7.2 install /app/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.7.2/node-v59-linux-x64-musl.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.7.2 and node@9.2.0 (node-v59 ABI, musl) (falling back to source compile with node-gyp)
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:483:19)
gyp ERR! stack at PythonFinder. (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:397:16)
gyp ERR! stack at F (/usr/local/lib/node_modules/npm/node_modules/which/which.js:68:16)
gyp ERR! stack at E (/usr/local/lib/node_modules/npm/node_modules/which/which.js:80:29)
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:89:16
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:42:5
gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/node_modules/isexe/mode.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:166:21)
gyp ERR! System Linux 4.9.49-moby
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=/app/node_modules/grpc/src/node/extension_binary/node-v59-linux-x64-musl/grpc_node.node" "--module_name=grpc_node" "--module_path=/app/node_modules/grpc/src/node/extension_binary/node-v59-linux-x64-musl"
gyp ERR! cwd /app/node_modules/grpc
gyp ERR! node -v v9.2.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/app/node_modules/grpc/src/node/extension_binary/node-v59-linux-x64-musl/grpc_node.node --module_name=grpc_node --module_path=/app/node_modules/grpc/src/node/extension_binary/node-v59-linux-x64-musl' (1)
node-pre-gyp ERR! stack at ChildProcess. (/app/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:159:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:943:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
node-pre-gyp ERR! System Linux 4.9.49-moby
node-pre-gyp ERR! command "/usr/local/bin/node" "/app/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /app/node_modules/grpc
node-pre-gyp ERR! node -v v9.2.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/app/node_modules/grpc/src/node/extension_binary/node-v59-linux-x64-musl/grpc_node.node --module_name=grpc_node --module_path=/app/node_modules/grpc/src/node/extension_binary/node-v59-linux-x64-musl' (1)
npm WARN playing-with-hapijs@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.7.2 install: node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@1.7.2 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! /root/.npm/_logs/2017-11-28T10_38_58_829Z-debug.log
The command '/bin/sh -c npm install --production' returned a non-zero code: 1

@Oted
Copy link

Oted commented Nov 28, 2017

@murgatroid99

Step 11/11 : RUN cd /app && npm install && npm install --global node-gyp mocha && npm install --unsafe-perm
 ---> Running in fa8b7bc5da04

> grpc@1.7.2 install /app/node_modules/grpc
> node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.7.2/node-v57-linux-x64-musl.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.7.2 and node@8.9.1 (node-v57 ABI, musl) (falling back to source compile with node-gyp)
make: Entering directory '/app/node_modules/grpc/build'

@yoitsro
Copy link

yoitsro commented Nov 30, 2017

@murgatroid99 Any updates on this? If the file does exist, then it looks like it's just a permissions error on https://storage.googleapis.com. Please can you confirm that the file exists and permissions are set correctly?

@murgatroid99
Copy link
Member

We do not have binaries for Alpine right now. As you can see it falls back to build from source, as it should, but it fails.

@murgatroid99
Copy link
Member

We have published grpc@1.8.0-pre2 which includes precompiled binaries for Alpine, so you can try those out now.

@murgatroid99
Copy link
Member

Since my last comment, we have published regular 1.8.x packages with Alpine precompiled binaries.

@Maijied
Copy link

Maijied commented Feb 6, 2018

uninstall previous node.js and
download load node version 8.4.0
Install and run .Hopefully the problem will be solve.

@mrpatel15
Copy link

node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.4.1/node-v59-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc@1.4.1 and node@9.0.0 (node-v59 ABI) (falling back to source compile with node-gyp)
CC(target) Release/obj.target/grpc/src/core/lib/surface/init.o
CC(target) Release/obj.target/grpc/src/core/lib/channel/channel_args.o
CC(target) Release/obj.target/grpc/src/core/lib/channel/channel_stack.o
CC(target) Release/obj.target/grpc/src/core/lib/channel/channel_stack_builder.o
CC(target) Release/obj.target/grpc/src/core/lib/channel/connected_channel.o
CC(target) Release/obj.target/grpc/src/core/lib/channel/handshaker.o

@murgatroid99
Copy link
Member

You are trying to install gRPC 1.4.1, which is relatively old, and does not work on Node 9. You can solve that by upgrading to a newer version of gRPC.

@xelra
Copy link

xelra commented Feb 22, 2018

I'm using Node on Windows and I'm also trying to install gRPC 1.4.1. It falls back to build, but the build fails. I've installed all the dependencies, but I just can't get it to compile on Windows in Node 9. Installing a newer version 1.9.1 works, because there are precompiled binaries available, but building the newer version with the --build-from-source option also fails.

I need 1.4.1, because the firebase-tools depend on it.

gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:160:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=C:\\Users\\xelra\\AppData\\Roaming\\npm\\node_modules\\grpc\\src\\node\\extension_binary\\node-v59-win32-x64-unknown\\grpc_node.node" "--module_name=grpc_node" "--module_path=C:\\Users\\xelra\\AppData\\Roaming\\npm\\node_modules\\grpc\\src\\node\\extension_binary\\node-v59-win32-x64-unknown"
gyp ERR! cwd C:\Users\xelra\AppData\Roaming\npm\node_modules\grpc
gyp ERR! node -v v9.5.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=C:\Users\xelra\AppData\Roaming\npm\node_modules\grpc\src\node\extension_binary\node-v59-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\xelra\AppData\Roaming\npm\node_modules\grpc\src\node\extension_binary\node-v59-win32-x64-unknown' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (C:\Users\xelra\AppData\Roaming\npm\node_modules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:160:13)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:943:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
node-pre-gyp ERR! System Windows_NT 10.0.16299
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\xelra\\AppData\\Roaming\\npm\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd C:\Users\xelra\AppData\Roaming\npm\node_modules\grpc
node-pre-gyp ERR! node -v v9.5.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --library=static_library --module=C:\Users\xelra\AppData\Roaming\npm\node_modules\grpc\src\node\extension_binary\node-v59-win32-x64-unknown\grpc_node.node --module_name=grpc_node --module_path=C:\Users\xelra\AppData\Roaming\npm\node_modules\grpc\src\node\extension_binary\node-v59-win32-x64-unknown' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.9.1 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@1.9.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

EDIT:
Trying to compile manually, following the instructions for Windows, I get stuck during configuration on this:

Using nasm
-- The ASM_NASM compiler identification is YASM
-- Found assembler: C:/ProgramData/chocolatey/bin/yasm.exe
-- Check size of __int32
-- Check size of __int32 - done
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.16.2.windows.1")
-- git Version: v1.3.5-d45132a2-dirty
-- Version: 1.3.5
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX -- compiled but failed to run
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX -- failed to compile
CMake Error at third_party/benchmark/CMakeLists.txt:183 (message):
  Failed to determine the source files for the regular expression backend

@murgatroid99
Copy link
Member

The best solution to that would probably be for firebase-tools to update their dependency to a newer version. Failing that, if you want to build the library on Windows, you will have to delete %USERPROFILE%\.node-gyp\9.5.0\include\node\openssl, then run the build again. It is unlikely but possible that this could mess up other builds.

@xelra
Copy link

xelra commented Feb 22, 2018

@murgatroid99 Thanks, that worked. I temporarily removed the openssl directory and the build went through. It would be great if it would compile without this "secret step".

Out of curiosity I'm still wondering where and why I got stuck on trying to compile manually. With YASM.

I also asked for a version bump on the firebase-tools repo.

@murgatroid99
Copy link
Member

The build script actually echos an instruction to delete that directory on Windows, but unfortunately it does that right before thousands of lines of compilation errors. And I'm not sure what instructions you were following to build on Windows, but I think that there's a good chance that they weren't the instructions for the Node library. I'm not very familiar with them, though, so I'm not sure why they failed.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests