title: There was an error while installing node modules using npm install in react native
body: <p>There was an error while installing node modules using<code>npm install</code>
  I have xcode and command line tools installed but the build still failed. </p>
  
  <p>I am adding a node module to a project of mine and I am not able to build the project till I do an npm install delete the node modules folder and do an npm install again. Just deleting the node modules and doing an npm install does not fix it.</p>
  
  <p>Here's the error output :</p>
  
  <pre><code>clang: warning: using sysroot for 'iPhoneSimulator' but targeting 'MacOSX' [-Wincompatible-sysroot]
  In file included from ../fsevents.cc:72:
  ../src/thread.cc:36:25: error: unknown type name 'ConstFSEventStreamRef'
  void HandleStreamEvents(ConstFSEventStreamRef stream, void *ctx, size_t ...
                          ^
  ../src/thread.cc:36:108: error: unknown type name 'FSEventStreamEventFlags'
    ...stream, void *ctx, size_t numEvents, void *eventPaths, const FSEventStre...
                                                                    ^
  ../src/thread.cc:36:152: error: unknown type name 'FSEventStreamEventId'
    ...*eventPaths, const FSEventStreamEventFlags eventFlags[], const FSEventSt...
                                                                      ^
  ../src/thread.cc:54:3: error: unknown type name 'FSEventStreamContext'
    FSEventStreamContext context = { 0, ctx, NULL, NULL, NULL };
    ^
  ../src/thread.cc:56:3: error: unknown type name 'FSEventStreamRef'
    FSEventStreamRef stream = FSEventStreamCreate(NULL, &amp;HandleStreamEvent...
    ^
  ../src/thread.cc:56:98: error: use of undeclared identifier
        'kFSEventStreamEventIdSinceNow'
    ...&amp;HandleStreamEvents, &amp;context, fse-&gt;paths, kFSEventStreamEventIdSinceNow...
                                                  ^
  6 errors generated.
  make: *** [Release/obj.target/fse/fsevents.o] Error 1
  gyp ERR! build error 
  gyp ERR! stack Error: `make` failed with exit code: 2
  gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
  gyp ERR! stack     at ChildProcess.emit (events.js:210:5)
  gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
  gyp ERR! System Darwin 19.2.0
  gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
  gyp ERR! cwd /Users/macos/Desktop/baps_yuva/node_modules/fsevents
  gyp ERR! node -v v12.14.0
  gyp ERR! node-gyp -v v5.0.5
  gyp ERR! not ok 
  </code></pre>