Open nazar-pc opened 6 years ago
Ping
Just googling the error you're seeing, I'm thinking something messed up with gradle setup on your machine, that probably gets taken care of automatically when installing Android Studio and setting it up for RN development, according to Facebook's instructions. If you want to avoid installing android studio, and still run a RN app, you probably need help from someone more experienced on the Android side of RN, I'm mostly only familiar with the iOS side.
If someone will find this issue using search, I did the following:
cd ~/Android/Sdk/tools/bin
./sdkmanager --licenses
yarn
cd android
export ANDROID_HOME=/home/nazar-pc/Android/Sdk
./gradlew wrapper
cd ..
sudo /home/nazar-pc/Android/Sdk/platform-tools/adb start-server
/home/nazar-pc/Android/Sdk/platform-tools/adb reverse tcp:8081 tcp:8081
node_modules/react-native-os/android/src/main/java/com/peel/react/RNOSModule.java
, removing @Override
node_modules/.bin/react-native run-android
However, I still got following:
Metro Bundler ready.
Loading dependency graph, done.
error: bundling failed: Error: Unable to resolve module `stream` from `/web/github/SimplePeerDemo/node_modules/browserify-sign/browser/index.js`: Module does not exist in the module map
This might be related to https://github.com/facebook/react-native/issues/4968
To resolve try the following:
1. Clear watchman watches: `watchman watch-del-all`.
2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.
3. Reset Metro Bundler cache: `rm -rf $TMPDIR/react-*` or `npm start -- --reset-cache`. 4. Remove haste cache: `rm -rf $TMPDIR/haste-map-react-native-packager-*`.
at ModuleResolver.resolveDependency (/web/github/SimplePeerDemo/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:311:1719)
at ResolutionRequest.resolveDependency (/web/github/SimplePeerDemo/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:96:16)
at DependencyGraph.resolveDependency (/web/github/SimplePeerDemo/node_modules/metro/src/node-haste/DependencyGraph.js:269:4352)
at /web/github/SimplePeerDemo/node_modules/metro/src/DeltaBundler/traverseDependencies.js:201:36
at Generator.next (<anonymous>)
at step (/web/github/SimplePeerDemo/node_modules/metro/src/DeltaBundler/traverseDependencies.js:256:306)
at /web/github/SimplePeerDemo/node_modules/metro/src/DeltaBundler/traverseDependencies.js:256:536
at new Promise (<anonymous>)
at /web/github/SimplePeerDemo/node_modules/metro/src/DeltaBundler/traverseDependencies.js:256:217
at addDependency (/web/github/SimplePeerDemo/node_modules/metro/src/DeltaBundler/traverseDependencies.js:256:92)
BUNDLE [android, dev] ./index.js ▓▓▓▓▓▓▓▓░░░░░░░░ 54.5% (400/542), failed.
@jd20, I've spent a lot of time to get this far, do you have an idea what is wrong now?
There is something wrong with this app, I've created new project and got "Welcome to React Native". Did you try to run this app from cloned repository in another directory?
I’m pretty sure I tried from a cloned repository, after following the steps in the README. Let me take a look today, and see if I can repro what you are seeing, I’ll report back.
I had same error as @nazar-pc , and get rid of it by following bkonkle's comment from this closed issue #109 https://github.com/feross/simple-peer/issues/109. I tested on ios.
I've never worked with Android, so this might be a trivial question, but nevertheless.
I've enabled adb usb debugging on my phone and started adb server, adb sees my phone without issues:
How I'm trying to run the demo:
The link in error points to 404 page.
What else do I need to do to run this? I'm on Linux (Ubuntu 18.04) and I have Nexus 6P.
I don't have Android studio and the rest of the development stack and I'd like to not installing all of that just to run a few lines of JS.