title: AWS IoT in React native. "fs".existsSync is not a function
body: <p>I'm trying to implement aws-iot-device-sdk in react native. As mentioned, i've followed below steps to do the setup.</p>
  <ol>
  <li>Install aws-sdk and aws-iot-device-sdk</li>
  </ol>
  <p>npm install --save aws-sdk aws-iot-device-sdk</p>
  <ol start="2">
  <li>Install RN nodeify</li>
  </ol>
  <p>npm install --save-dev rn-nodeify</p>
  <ol start="3">
  <li>Install dependencies with rn-nodeify</li>
  </ol>
  <p>npx rn-nodeify --install &quot;fs,util,path,tls,stream,buffer,global,process,events,url&quot; --hack</p>
  <ol start="4">
  <li>Add this line into scripts part in package.json file</li>
  </ol>
  <p>&quot;postinstall&quot;: &quot;npx rn-nodeify --install 'fs,util,path,tls,stream,buffer,global,process,events,url' --hack&quot;</p>
  <ol start="5">
  <li>Install asyncstorage-down</li>
  </ol>
  <p>npm install --save asyncstorage-down</p>
  <ol start="6">
  <li>Import shim file into index.js</li>
  </ol>
  <p>import './shim';</p>
  <p>As soon as I'm trying to call AwsIot.device() by passing certificate and private key, i'm getting below error.</p>
  <p><strong>TypeError: _$$_REQUIRE(<em>dependencyMap[2], &quot;fs&quot;).existsSync is not a function. (In '</em>$$_REQUIRE(<em>dependencyMap[2], &quot;fs&quot;).existsSync(options.caCert)', '</em>$$_REQUIRE(_dependencyMap[2], &quot;fs&quot;).existsSync' is undefined)</strong></p>