4

Yesterday my React Native project is working well, but today after I open my React Native project and running "npm start" or "react native-run-android" without adding any codes or libraries yet it always give me error now. I'm just confused I did nothing but I'm getting error.

This is the error I got by running "npm start" or "react-native run-android" :

Loading dependency graph...events.js:167 throw er; // Unhandled 'error' event ^

Error: UNKNOWN: unknown error, lstat 'D:\React Native Projects\TheProject\node_modules\babel-register'

Emitted 'error' event at: at NodeWatcher.checkedEmitError (D:\React Native Projects\TheProject\node_modules\sane\src\node_watcher.js:159:10) at Walker.emit (events.js:182:13) at D:\React Native Projects\TheProject\node_modules\walker\lib\walker.js:52:12 at D:\React Native Projects\TheProject\node_modules\graceful-fs\polyfills.js:282:31 at FSReqWrap.oncomplete (fs.js:154:21)

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] start: node node_modules/react-native/local-cli/cli.js start npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

4
  • Restart your system and try again Commented Jan 16, 2019 at 3:37
  • @BrijeshShiroya already did that... Commented Jan 16, 2019 at 10:52
  • I also tried to "npm start" in my other projects and works well. Just this project that I did nothing and this error occurs Commented Jan 16, 2019 at 11:26
  • Try npm install, npm link and then react-native run-android Commented Jan 16, 2019 at 18:41

1 Answer 1

4

The easiest thing would be to install Watchman in mac:

$ brew update
$ brew install watchman

If you don't have brew, do this first:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Sign up to request clarification or add additional context in comments.

3 Comments

Great! I also did brew upgrade.
what about windows?
use mac bro instead of windows

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.