Closed Sascha195 closed 4 years ago
@Sascha195 First, we don't officially support Electron. Said that, we produce rebuilt binaries for selected versions: https://github.com/realm/realm-js/blob/master/Jenkinsfile#L13. Please downgrade Electron from v9.0.4 to v8.1.1.
@kneth yes I'm aware of this but on mac os it's working just fine, expect for windows. Even if I downgrade to v8.1.1. I still receive the same error.
@Sascha195 v10.0.0-beta.7 includes fix for SSL on Windows (#2975).
But the error message LNK1181: Eingabedatei "libcrypto.lib" kann nicht geöffnet werden?
indicates that you haven't installed OpenSSL (see https://github.com/realm/realm-js/blob/v10/README.md#additional-steps-for-windows).
@kneth I've installed openSSL as descriped from your link and this is the new error message I get after the npm install
.
λ npm install
> project-desktop@0.1.0 postinstall D:\coding\react-native\project-desktop
> electron-builder install-app-deps
• electron-builder version=22.7.0
• loaded configuration file=package.json ("build" field)
• loaded parent configuration preset=react-cra
• rebuilding native dependencies dependencies=realm@10.0.0-beta.6, fsevents@1.2.13, fsevents@1.2.13, fsevents@1.2.13 platform=win32 arch=x64
⨯ cannot execute cause=exit status 1
out=
> fsevents@1.2.13 install D:\coding\react-native\project-desktop\node_modules\jest-haste-map\node_modules\fsevents
> node install.js
Skipping 'fsevents' build as platform win32 is not supported
> fsevents@1.2.13 install D:\coding\react-native\project-desktop\node_modules\webpack-dev-server\node_modules\fsevents
> node install.js
Skipping 'fsevents' build as platform win32 is not supported
> realm@10.0.0-beta.6 install D:\coding\react-native\project-desktop\node_modules\realm
> node-pre-gyp install --fallback-to-build -j 8
Warning: Missing input files:
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\test-runners\jest\package.json
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\js\session-tests.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\test-runners\ava\test.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\js\garbage-collection.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\spec\support\jasmine.json
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\test-runners\mocha\test.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\js\realm-tests.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\js\index.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\js\query-tests.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\spec\helpers\reporters.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\js\package.json
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\js\encryption-tests.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\scripts\changelog-header.sh
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\spec\helpers\setup-module-path.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\package.json
D:\coding\react-native\project-desktop\node_modules\realm\build\..\scripts\publish.sh
D:\coding\react-native\project-desktop\node_modules\realm\build\..\scripts\set-version.sh
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\js\user-tests.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\js\worker.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\scripts\test.sh
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\js\migration-tests.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\js\list-tests.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\spec\helpers\mock_realm.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\js\object-tests.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\index.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\js\asserts.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\test-runners\mocha\package.json
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\js\query-tests.json
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\js\download-api-helper.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\js\results-tests.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\js\object-id-tests.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\js\worker-tests-script.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\js\async-tests.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\spec\unit_tests.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\js\linkingobjects-tests.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\.eslintrc.json
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\test-runners\jest\test.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\js\schemas.js
D:\coding\react-native\project-desktop\node_modules\realm\build\..\tests\test-runners\ava\package.json
download-realm
nothing.vcxproj -> D:\coding\react-native\project-desktop\node_modules\realm\build\Release\\nothing.lib
Resolved requirements: { SYNC_SERVER_FOLDER: 'sync',
SYNC_ARCHIVE: 'realm-sync-Release-v10.0.0-beta.2-Windows-x64-devel.tar.gz',
CORE_SERVER_FOLDER: 'core',
CORE_ARCHIVE: 'realm-core-Release-v10.0.0-beta.1-Windows-x64-devel.tar.gz' }
Resolved options: { platform: 'win', sync: true, arch: 'x64' }
Matching lockfile already exists at target - nothing to do (use --force to override)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(231,5): warning MSB8065: Der benutzerdefinierte Build f�r das Element "D:\coding\react-native\project-desktop\node_modules\realm\scripts\download-realm.js" war erfolgreich, aber die angegebene Ausgabe "d:\coding\react-native\project-desktop\node_modules\realm\vendor\realm-win-x64" wurde nicht erstellt. Dies kann dazu f�hren, dass der inkrementelle Build nicht ordnungsgem�� funktioniert. [D:\coding\react-native\project-desktop\node_modules\realm\build\vendored-realm.vcxproj]
binding_callback_thread_observer.cpp
collection_notifications.cpp
index_set.cpp
list.cpp
object.cpp
object_changeset.cpp
object_schema.cpp
object_store.cpp
placeholder.cpp
results.cpp
schema.cpp
shared_realm.cpp
thread_safe_reference.cpp
collection_change_builder.cpp
collection_notifier.cpp
list_notifier.cpp
object_notifier.cpp
realm_coordinator.cpp
results_notifier.cpp
transact_log_handler.cpp
weak_realm_notifier.cpp
scheduler.cpp
uuid.cpp
external_commit_helper.cpp
sync_file.cpp
sync_metadata.cpp
async_open_task.cpp
sync_manager.cpp
sync_session.cpp
sync_user.cpp
app.cpp
app_credentials.cpp
remote_mongo_client.cpp
remote_mongo_collection.cpp
remote_mongo_database.cpp
generic_network_transport.cpp
bson.cpp
regular_expression.cpp
win_delay_load_hook.cc
object-store.vcxproj -> D:\coding\react-native\project-desktop\node_modules\realm\build\Release\\object-store.lib
js_realm.cpp
node_init.cpp
platform.cpp
sync_logger.cpp
win_delay_load_hook.cc
Bibliothek "D:\coding\react-native\project-desktop\node_modules\realm\build\Release\realm.lib" und Objekt "D:\coding\react-native\project-desktop\node_modules\realm\build\Release\realm.exp" werden erstellt.
realm-sync.lib(network_ssl.obj) : error LNK2001: Nicht aufgel�stes externes Symbol "CRYPTO_cleanup_all_ex_data". [D:\coding\react-native\project-desktop\node_modules\realm\build\realm.vcxproj]
realm-sync.lib(network_ssl.obj) : error LNK2001: Nicht aufgel�stes externes Symbol "CRYPTO_num_locks". [D:\coding\react-native\project-desktop\node_modules\realm\build\realm.vcxproj]
realm-sync.lib(network_ssl.obj) : error LNK2001: Nicht aufgel�stes externes Symbol "CRYPTO_set_locking_callback". [D:\coding\react-native\project-desktop\node_modules\realm\build\realm.vcxproj]
realm-sync.lib(network_ssl.obj) : error LNK2001: Nicht aufgel�stes externes Symbol "OPENSSL_add_all_algorithms_noconf". [D:\coding\react-native\project-desktop\node_modules\realm\build\realm.vcxproj]
realm-sync.lib(network_ssl.obj) : error LNK2001: Nicht aufgel�stes externes Symbol "EVP_cleanup". [D:\coding\react-native\project-desktop\node_modules\realm\build\realm.vcxproj]
realm-sync.lib(network_ssl.obj) : error LNK2001: Nicht aufgel�stes externes Symbol "SSL_load_error_strings". [D:\coding\react-native\project-desktop\node_modules\realm\build\realm.vcxproj]
realm-sync.lib(network_ssl.obj) : error LNK2001: Nicht aufgel�stes externes Symbol "SSLv23_method". [D:\coding\react-native\project-desktop\node_modules\realm\build\realm.vcxproj]
realm-sync.lib(network_ssl.obj) : error LNK2001: Nicht aufgel�stes externes Symbol "SSL_library_init". [D:\coding\react-native\project-desktop\node_modules\realm\build\realm.vcxproj]
realm-sync.lib(network_ssl.obj) : error LNK2001: Nicht aufgel�stes externes Symbol "ERR_free_strings". [D:\coding\react-native\project-desktop\node_modules\realm\build\realm.vcxproj]
D:\coding\react-native\project-desktop\node_modules\realm\build\Release\realm.node : fatal error LNK1120: 9 nicht aufgel�ste Externe [D:\coding\react-native\project-desktop\node_modules\realm\build\realm.vcxproj]
Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\Sascha\AppData\Roaming\nvm\v10.21.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --jobs=8 --module=D:\coding\react-native\project-desktop\node_modules\realm\compiled\electron-v9.0_win32_x64\realm.node --module_name=realm --module_path=D:\coding\react-native\project-desktop\node_modules\realm\compiled\electron-v9.0_win32_x64 --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=electron-v9.0' (1)
errorOut=node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://static.realm.io/node-pre-gyp/10.0.0-beta.6/realm-v10.0.0-beta.6-electron-v9.0-win32-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for realm@10.0.0-beta.6 and electron@9.0.5 (electron-v9.0 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Users\Sascha\AppData\Roaming\nvm\v10.21.0\node_modules\npm\node_modules\node-gyp\lib\build.js:194: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 Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Sascha\\AppData\\Roaming\\nvm\\v10.21.0\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build" "--fallback-to-build" "--jobs=8" "--module=D:\\coding\\react-native\\project-desktop\\node_modules\\realm\\compiled\\electron-v9.0_win32_x64\\realm.node" "--module_name=realm" "--module_path=D:\\coding\\react-native\\project-desktop\\node_modules\\realm\\compiled\\electron-v9.0_win32_x64" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=electron-v9.0"
gyp ERR! cwd D:\coding\react-native\project-desktop\node_modules\realm
gyp ERR! node -v v10.21.0
gyp ERR! node-gyp -v v5.1.0
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:\Users\Sascha\AppData\Roaming\nvm\v10.21.0\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js build --fallback-to-build --jobs=8 --module=D:\coding\react-native\project-desktop\node_modules\realm\compiled\electron-v9.0_win32_x64\realm.node --module_name=realm --module_path=D:\coding\react-native\project-desktop\node_modules\realm\compiled\electron-v9.0_win32_x64 --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=electron-v9.0' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (D:\coding\react-native\project-desktop\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 Windows_NT 10.0.18362
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\coding\\react-native\\project-desktop\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build" "-j" "8"
node-pre-gyp ERR! cwd D:\coding\react-native\project-desktop\node_modules\realm
node-pre-gyp ERR! node -v v10.21.0
node-pre-gyp ERR! node-pre-gyp -v v0.15.0
node-pre-gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! realm@10.0.0-beta.6 install: `node-pre-gyp install --fallback-to-build -j 8`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the realm@10.0.0-beta.6 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! C:\Users\Sascha\AppData\Roaming\npm-cache\_logs\2020-08-05T10_46_45_495Z-debug.log
command='C:\Program Files\nodejs\node.exe' 'C:\Users\Sascha\AppData\Roaming\nvm\v10.21.0\node_modules\npm\bin\npm-cli.js' rebuild realm@10.0.0-beta.6 fsevents@1.2.13 fsevents@1.2.13 fsevents@1.2.13
workingDir=
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! project-desktop@0.1.0 postinstall: `electron-builder install-app-deps`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the project-desktop@0.1.0 postinstall 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! C:\Users\Sascha\AppData\Roaming\npm-cache\_logs\2020-08-05T10_46_45_575Z-debug.log
Resolved it by the following:
$ npm install -g node-gyp
$ npm install -g node-pre-gyp
$ npm update
$ npm install
Goals
Trying to install realm in react-native-web / electron project on Windows 10 64bit
Expected Results
npm install compiling successfully
Actual Results
package.json
Code Sample
Version of Realm and Tooling