facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.37k stars 24.25k forks source link

Uncaught Error: Requiring module "NativeModules" which threw an exception #6446

Closed felemon closed 8 years ago

felemon commented 8 years ago

Help, I occured an question 'Uncaught Error: Uncaught Error: Requiring module "NativeModules" which threw an exception' when running movieapp examples of master on windows 7 android genymotion.

qq 20160314150554

The detail log is Error: Requiring module "Systrace" which threw an exception, stack: Error: Requiring module "Systrace" which threw an exception at requireImpl (MoviesApp.android.bundle:62) at _require (MoviesApp.android.bundle:36) at MoviesApp.android.bundle:38375 at requireImpl (MoviesApp.android.bundle:76) at _require (MoviesApp.android.bundle:36) at MoviesApp.android.bundle:38331 at requireImpl (MoviesApp.android.bundle:76) at _require (MoviesApp.android.bundle:36) at MoviesApp.android.bundle:42805 at requireImpl (MoviesApp.android.bundle:76)reactConsoleError @ MoviesApp.android.bundle:45757onError @ MoviesApp.android.bundle:817ErrorUtils.reportFatalError @ MoviesApp.android.bundle:765requireImpl @ MoviesApp.android.bundle:46_require @ MoviesApp.android.bundle:36(anonymous function) @ MoviesApp.android.bundle:53341messageHandlers.executeApplicationScript @ debuggerWorker.js:18onmessage @ debuggerWorker.js:33 debuggerWorker.js:18Uncaught Error: Uncaught Error: Requiring module "NativeModules" which threw an exception

The steps is like the article( https://github.com/facebook/react-native#examples )

  1. git clone (https://github.com/facebook/react-native.git)
  2. cd react-native && npm install
  3. ./gradlew :Examples:Movies:android:app:installDebug
  4. ./packager/packager.sh

And another question is only movieapp was installed after the steps, how to install other examples like 2048, UIExplorer, TicTacToe etc.

guyca commented 8 years ago

I'm getting the exact same error trying to run my app using the react-native master branch. I followed this link. stack trace running on Emulator with android M.

I've tried deleting node_modules folder and npm installing again - didn't help.

Edit: Never mind. running npm install --save github:facebook/react-native#master didn't work but cloning master directly to node_modules and running npm install worked fine.

felemon commented 8 years ago

@guyca It works, thank you so much.

jsierles commented 8 years ago

@facebook-github-bot answered

facebook-github-bot commented 8 years ago

Closing this issue as @jsierles says the question asked has been answered. Please help us by asking questions on StackOverflow. StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only.