question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error when install Realm on window

See original GitHub issue

Hi all,

I have try to install Realm on window for new project react-native, but it fall

step I did:

create new react-native project react-native init TestRealm cd TestRealm

And then install Realm

npm install --save realm

And link

react-native link realm

Then run

react-native run-android

but it have error

C:\Users\keyyu\Atom\Workspace\TestRealm>react-native run-android
Starting JS server...
'adb' is not recognized as an internal or external command,
operable program or batch file.
Building and installing the app on the device (cd android && gradlew.bat installDebug)...

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\keyyu\Atom\Workspace\TestRealm\node_modules\realm\android\build.gradle' line: 71

* What went wrong:
A problem occurred evaluating project ':realm'.
> Cannot run program "npm" (in directory "C:\Users\keyyu\Atom\Workspace\TestRealm\node_modules\realm\android"): CreateProcess error=2, The system cannot find the file specified

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 22.896 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

(node:10272) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'message' of undefined

I did step by step like https://realm.io/docs/react-native/latest/.

my enviroment

“node”: v6.9.2 “npm”: v3.10.9 “react”: “15.4.2”, “react-native”: “0.40.0”, “realm”: “^0.15.4”

Please help.

Thank you!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Cody-G-Gcommented, Feb 13, 2017

Having same issue in 1.0.2. Simply commenting out that line seems to be fixing it so far at least…

1reaction
Dragascommented, Jan 31, 2017

I did run into same issue, but after commenting out the version in ..\node_modules\realm\android\build.gradle another error popped up.

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':realm:compileReleaseJavaWithJavac'.
> Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_121 contains a valid JDK installation.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

But only when trying to run via console. Seems to work fine with commented out version while building via android studio.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm install failing on windows #2329 - realm/realm-js - GitHub
Goals npm install on windows After trying to deal with gyp and python dependency, I ended up installing python with windows-build-tools and ...
Read more >
Minecraft Realms Plus Troubleshooting – Home
If you encounter connection or timeout errors in Realms Plus, there are a few things that you can do to attempt to resolve...
Read more >
Troubleshoot hybrid Azure Active Directory-joined devices
This article helps you troubleshoot hybrid Azure Active Directory-joined Windows 10 and Windows Server 2016 devices.
Read more >
Unable to install realm-cli (Mac) - mongodb - Stack Overflow
I'm running sudo npm install -g mongodb-realm-cli , which gives me the following error: npm WARN deprecated request@2.88.2: request has been ...
Read more >
Add Linux to Windows Domain using realm (CentOS/RHEL 7/8)
Install adcli package along with sssd : Here,. sssd: The System Security Services daemon can be used to divert client authentication as required;...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found