Reputation: 904
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.
Upvotes: 4
Views: 8569
Reputation: 1285
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)"
Upvotes: 4