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

Getting "Could NOT find ZLIB" when using "npm i realm" on Windows #4620

Closed
Voidoz opened this issue Jun 4, 2022 · 5 comments
Closed

Getting "Could NOT find ZLIB" when using "npm i realm" on Windows #4620

Voidoz opened this issue Jun 4, 2022 · 5 comments

Comments

@Voidoz
Copy link

Voidoz commented Jun 4, 2022

How frequently does the bug occur?

All the time

Description

When I run npm i realm for my react-native project on my Windows machine I get an error stating that it could not find ZLIB.

Stacktrace & log output

[PATH_TO_PROJECT]>npm i realm
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path [PATH_TO_PROJECT]\node_modules\realm
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c prebuild-install -r napi || cmake-js build
npm ERR! [
npm ERR!   'C:\\Program Files\\nodejs\\node.exe',
npm ERR!   'C:\\Users\\[ME]\\AppData\\Roaming\\npm\\node_modules\\cmake-js\\bin\\cmake-js',
npm ERR!   'build'
npm ERR! ]
npm ERR! Not searching for unused variables given on the command line.
npm ERR! -- Selecting Windows SDK version 10.0.19041.0 to target Windows 8.1.
npm ERR! -- The C compiler identification is MSVC 19.32.31329.0
npm ERR! -- The CXX compiler identification is MSVC 19.32.31329.0
npm ERR! -- Detecting C compiler ABI info
npm ERR! -- Detecting C compiler ABI info - done
npm ERR! -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe - skipped
npm ERR! -- Detecting C compile features
npm ERR! -- Detecting C compile features - done
npm ERR! -- Detecting CXX compiler ABI info
npm ERR! -- Detecting CXX compiler ABI info - done
npm ERR! -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.32.31326/bin/Hostx64/x64/cl.exe - skipped
npm ERR! -- Detecting CXX compile features
npm ERR! -- Detecting CXX compile features - done
npm ERR! -- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.34.0.windows.1")
npm ERR! -- Looking for pthread.h
npm ERR! -- Looking for pthread.h - not found
npm ERR! -- Found Threads: TRUE
npm ERR! -- Found OpenSSL: optimized;C:/Program Files/OpenSSL-Win64/lib/VC/static/libcrypto64MD.lib;debug;C:/Program Files/OpenSSL-Win64/lib/VC/static/libcrypto64MDd.lib (found version "1.1.1o")
npm ERR! -- Configuring incomplete, errors occurred!
npm ERR! See also "[PATH_TO_PROJECT]/node_modules/realm/build/CMakeFiles/CMakeOutput.log".
npm ERR! See also "[PATH_TO_PROJECT]/node_modules/realm/build/CMakeFiles/CMakeError.log".
npm ERR! prebuild-install WARN install write EPROTO 15408:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:c:\ws\deps\openssl\openssl\ssl\record\rec_layer_s3.c:1546:SSL alert number 40
npm ERR! prebuild-install WARN install
npm ERR! info TOOL Using Visual Studio 17 2022 generator.
npm ERR! info CMD CONFIGURE
npm ERR! info RUN [
npm ERR! info RUN   'cmake',
npm ERR! info RUN   '[PATH_TO_PROJECT]\\node_modules\\realm',
npm ERR! info RUN   '--no-warn-unused-cli',
npm ERR! info RUN   '-G',
npm ERR! info RUN   'Visual Studio 17 2022',
npm ERR! info RUN   '-DCMAKE_JS_VERSION=6.3.0',
npm ERR! info RUN   '-DCMAKE_BUILD_TYPE=Release',
npm ERR! info RUN   '-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=[PATH_TO_PROJECT]\\node_modules\\realm\\build',
npm ERR! info RUN   '-DCMAKE_JS_INC=C:\\Users\\[ME]\\.cmake-js\\node-x64\\v16.13.0\\include\\node',
npm ERR! info RUN   '-DCMAKE_JS_SRC=C:/Users/[ME]/AppData/Roaming/npm/node_modules/cmake-js/lib/cpp/win_delay_load_hook.cc',
npm ERR! info RUN   '-DNODE_RUNTIME=node',
npm ERR! info RUN   '-DNODE_RUNTIMEVERSION=16.13.0',
npm ERR! info RUN   '-DNODE_ARCH=x64',
npm ERR! info RUN   '-DCMAKE_JS_LIB=C:\\Users\\[ME]\\.cmake-js\\node-x64\\v16.13.0\\win-x64\\node.lib',
npm ERR! info RUN   '-DCMAKE_SHARED_LINKER_FLAGS=/DELAYLOAD:NODE.EXE'
npm ERR! info RUN ]
npm ERR! Dependencies: PACKAGE_NAME=realm-core;VERSION=12.1.0;OPENSSL_VERSION=1.1.1n;MDBREALM_TEST_SERVER_TAG=2022-05-30
npm ERR! CMake Error at C:/Program Files/CMake/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
npm ERR!   Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
npm ERR! Call Stack (most recent call first):
npm ERR!   C:/Program Files/CMake/share/cmake-3.23/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
npm ERR!   C:/Program Files/CMake/share/cmake-3.23/Modules/FindZLIB.cmake:120 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
npm ERR!   C:/src/vcpkg/scripts/buildsystems/vcpkg.cmake:824 (_find_package)
npm ERR!   vendor/realm-core/CMakeLists.txt:290 (find_package)
npm ERR!
npm ERR!
npm ERR! ERR! OMG Process terminated: 1

Can you reproduce the bug?

Yes, always

Reproduction Steps

Run npm i realm in a node project on a Windows machine

Version

10.19.0

What SDK flavour are you using?

Local Database only

Are you using encryption?

No, not using encryption

Platform OS and version(s)

Windows 11

Build environment

No response

Cocoapods version

No response

@Off2Race
Copy link

Off2Race commented Jun 4, 2022

Hi, @Voidoz – Looking at your log output, this issue might be the same as #4619

@Voidoz
Copy link
Author

Voidoz commented Jun 4, 2022

Hi, @Voidoz – Looking at your log output, this issue might be the same as #4619

Hmm potentially. Won't be able to find out until that gets dealt with.

@brianMxBm
Copy link

Currently have the same issue.

@kraenhansen
Copy link
Member

@Voidoz & @mxbm can I get you to try again now that #4619 has been resolved? Please reopen this issue if it persists.

@kraenhansen kraenhansen closed this as not planned Won't fix, can't repro, duplicate, stale Jun 6, 2022
@Voidoz
Copy link
Author

Voidoz commented Jun 6, 2022

@Voidoz & @mxbm can I get you to try again now that #4619 has been resolved? Please reopen this issue if it persists.

Sorry mate I did try this yesterday and it's all good now.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
@sync-by-unito sync-by-unito bot closed this as completed Mar 15, 2024
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

4 participants