title: Suddenly seeing error "Plugin/Preset files are not allowed to export objects, only functions" in create-react-native-app project
body: <p>Have been working on a project generated via <code>create-react-native-app</code>. Have been successfully using the project for some time, but now trying to test the app via <code>exp start --tunnel</code>, am suddenly seeing error (though was working previously) of the form: </p>
  
  <pre><code>[22:08:19] /path/to/node_modules/react-native-scripts/build/bin/crna-entry.js: Plugin/Preset files are not allowed to export objects, only functions. In /path/to/node_modules/babel-preset-expo/index.js
  [22:08:19] Failed building JavaScript bundle.
  </code></pre>
  
  <p>Have seen some posts that seem to deal with the problem (<a href="https://github.com/babel/babel/issues/6808" rel="noreferrer">https://github.com/babel/babel/issues/6808</a> and <a href="https://stackoverflow.com/questions/47830273/babel-plugin-preset-files-are-not-allowed-to-export-objects-only-functions">Babel Plugin/Preset files are not allowed to export objects, only functions</a>), but am totally new to react-anything and don't fully get what <code>bable</code> is, so am having difficulty understanding how to apply these posts to my own situation.</p>
  
  <p>My .bablerc file (as it seems to be relevant in the other posts) is:</p>
  
  <pre><code>{
    "presets": ["babel-preset-expo"],
    "env": {
      "development": {
        "plugins": ["transform-react-jsx-source"]
      }
    }
  }
  </code></pre>
  
  <p>Have tried <code>npm cache clean --force &amp;&amp; rm -rf node_modules &amp;&amp; rm -f package-lock.json &amp;&amp; npm install</code> with no change. <strong>What does seem to help is downgrading from react-native@0.56 to 0.55</strong> (as espoused here: <a href="https://stackoverflow.com/questions/51210574/create-react-native-app-plugin-preset-files-are-not-allowed-to-export-objects">Create React Native App. - Plugin/Preset files are not allowed to export objects, only functions</a>), but this does not seem to address the problem directly and more of a <em>workaround</em>. Any advice on what should be done here would be appreciated (any other files that should be included to help debug?).</p>
  
  <hr>
  
  <p>** In response to this question being marked as a potential duplicate of <a href="https://stackoverflow.com/questions/51210574/create-react-native-app-plugin-preset-files-are-not-allowed-to-export-objects">Create React Native App. - Plugin/Preset files are not allowed to export objects, only functions</a>, </p>
  
  <ol>
  <li>this question was actually cited in the post and explanation of why this question was posted despite the existence of the other was included in the last paragraph and </li>
  <li>my later answer to <em>this</em> question explains to other users <em>why</em> the downgrade to 0.55 resolves the problem (and cites relevant docs that users can further inspect), which (<em>at the time</em> of this question's posting) was not present in the other cited question (though presently, the user who has marked this question as a duplicate now has an answer in the cited question that does also talk about why the 0.55 downgrade works).  </li>
  </ol>