title: React Native: The node type SpreadProperty has been renamed to SpreadElement
body: <p>I recently upgrade from React Native 0.53.3 to React Native 0.59.9 and my application keeps crashing inside of simulator. It will display the splash screen and then just crash with nothing inside of debugger-ui except for this:</p>
  
  <blockquote>
    <p>WebSocket connection to
    'ws://localhost:8081/debugger-proxy?role=debugger&amp;name=Chrome' failed:
    Error in connection establishment: net::ERR_CONNECTION_REFUSED</p>
  </blockquote>
  
  <p>I was running it with <code>react-native run-ios</code> but the build was succeeding there so no error message. When I tried to open the app while having Xcode open it did refer to an error of not being able to find the <code>.jsbundle</code> file and inside of Xcode, I do have a <code>main.jsbundle</code> in red, indicating its missing.</p>
  
  <p>So after finding this article:
  <a href="https://medium.com/the-react-native-log/first-time-deploying-with-react-native-f524eb3e705d#59ee" rel="nofollow noreferrer">https://medium.com/the-react-native-log/first-time-deploying-with-react-native-f524eb3e705d#59ee</a></p>
  
  <p>I tried following it by utilizing a script of <code>npm run build:ios</code> which is referencing this script:</p>
  
  <pre><code>"build:ios": "react-native bundle --entry-file='index.ios.js' --bundle-output='./ios/NFIBEngage/main.jsbundle' --dev=false --platform='ios' --assets-dest='./ios'"
  </code></pre>
  
  <p>But when I run that, I get this error:</p>
  
  <pre><code>Loading dependency graph, done.
  transform[stderr]: Trace: The node type SpreadProperty has been renamed to SpreadElement
  transform[stderr]:     at Object.isSpreadProperty (/Users/danale/Projects/engage-application.mobile/node_modules/@babel/types/lib/validators/generated/index.js:4304:11)
  transform[stderr]:     at hasSpread (/Users/danale/Projects/engage-application.mobile/node_modules/babel-plugin-transform-object-rest-spread/lib/index.js:38:13)
  transform[stderr]:     at PluginPass.ObjectExpression (/Users/danale/Projects/engage-application.mobile/node_modules/babel-plugin-transform-object-rest-spread/lib/index.js:234:14)
  transform[stderr]:     at newFn (/Users/danale/Projects/engage-application.mobile/node_modules/@babel/traverse/lib/visitors.js:193:21)
  transform[stderr]:     at NodePath._call (/Users/danale/Projects/engage-application.mobile/node_modules/@babel/traverse/lib/path/context.js:53:20)
  transform[stderr]:     at NodePath.call (/Users/danale/Projects/engage-application.mobile/node_modules/@babel/traverse/lib/path/context.js:40:17)
  transform[stderr]:     at NodePath.visit (/Users/danale/Projects/engage-application.mobile/node_modules/@babel/traverse/lib/path/context.js:88:12)
  transform[stderr]:     at TraversalContext.visitQueue (/Users/danale/Projects/engage-application.mobile/node_modules/@babel/traverse/lib/context.js:118:16)
  transform[stderr]:     at TraversalContext.visitSingle (/Users/danale/Projects/engage-application.mobile/node_modules/@babel/traverse/lib/context.js:90:19)
  transform[stderr]:     at TraversalContext.visit (/Users/danale/Projects/engage-application.mobile/node_modules/@babel/traverse/lib/context.js:146:19)
  error node_modules/react-native-keyboard-manager/index.js: Cannot read property 'bindings' of null. Run CLI with --verbose flag for more details.
  </code></pre>
  
  <p>The only post related to that error on SO is the one below:</p>
  
  <pre><code>https://stackoverflow.com/questions/53326986/trace-the-node-type-spreadproperty-has-been-renamed-to-spreadelement-at-object
  </code></pre>
  
  <p>and it does not really apply to my case.</p>
  
  <p>The problem seems to be with a <code>@babel</code> library inside the <code>node_modules</code> which I have tried doing an <code>rm -rf node_modules</code>, but that did not resolve it.</p>
  
  <p>Can someone confirm if one of these dev dependencies no longer support the current version of this project?</p>
  
  <pre><code>"devDependencies": {
      "async": "2.6.0",
      "babel-cli": "6.24.1",
      "babel-eslint": "8.0.2",
      "babel-jest": "23.0.0",
      "babel-plugin-module-resolver": "3.0.0",
      "babel-preset-env": "1.4.0",
      "babel-preset-flow": "6.23.0",
      "babel-preset-react-native": "4.0.0",
      "babel-preset-stage-2": "6.24.1",
      "babel-watch": "2.0.6",
  </code></pre>
  
  <p>Has anyone resolved a similar issue with upgrading to React Native 0.59.9?</p>
  
  <p>I have learned that after RN 0.49, we use <code>index.js</code> instead of <code>index.ios.js</code> and I verified this when I created a mock version to try to get a baseline application to try to figure out what is going on.</p>
  
  <p>I did the following:</p>
  
  <pre><code>✗ mv index.ios.js index.js
  ➜  engage-application.mobile git:(feature/3.6.2_upgrade) ✗ rm index.android.js
  ➜  engage-application.mobile git:(feature/3.6.2_upgrade) ✗ react-native bundle --entry-file ./index.js --platform ios --bundle-output ios/main.jsbundle --verbose
  Loading dependency graph, done.
  transform[stderr]: Trace: The node type SpreadProperty has been renamed to SpreadElement
  transform[stderr]:     at Object.isSpreadProperty (/Users/danale/Projects/engage-application.mobile/node_modules/@babel/types/lib/validators/generated/index.js:4304:11)
  transform[stderr]:     at hasSpread (/Users/danale/Projects/engage-application.mobile/node_modules/babel-plugin-transform-object-rest-spread/lib/index.js:38:13)
  transform[stderr]:     at PluginPass.ObjectExpression (/Users/danale/Projects/engage-application.mobile/node_modules/babel-plugin-transform-object-rest-spread/lib/index.js:234:14)
  transform[stderr]:     at newFn (/Users/danale/Projects/engage-application.mobile/node_modules/@babel/traverse/lib/visitors.js:193:21)
  transform[stderr]:     at NodePath._call (/Users/danale/Projects/engage-application.mobile/node_modules/@babel/traverse/lib/path/context.js:53:20)
  transform[stderr]:     at NodePath.call (/Users/danale/Projects/engage-application.mobile/node_modules/@babel/traverse/lib/path/context.js:40:17)
  transform[stderr]:     at NodePath.visit (/Users/danale/Projects/engage-application.mobile/node_modules/@babel/traverse/lib/path/context.js:88:12)
  transform[stderr]:     at TraversalContext.visitQueue (/Users/danale/Projects/engage-application.mobile/node_modules/@babel/traverse/lib/context.js:118:16)
  transform[stderr]:     at TraversalContext.visitSingle (/Users/danale/Projects/engage-application.mobile/node_modules/@babel/traverse/lib/context.js:90:19)
  transform[stderr]:     at TraversalContext.visit (/Users/danale/Projects/engage-application.mobile/node_modules/@babel/traverse/lib/context.js:146:19)
  error App.js: Cannot read property 'bindings' of null
  debug TypeError: Cannot read property 'bindings' of null
      at Scope.moveBindingTo (/Users/danale/Projects/engage-application.mobile/node_modules/@babel/traverse/lib/scope/index.js:864:13)
      at BlockScoping.updateScopeInfo (/Users/danale/Projects/engage-application.mobile/node_modules/babel-plugin-transform-es2015-block-scoping/lib/index.js:364:17)
  </code></pre>
  
  <p>and I still get the same error regardless.</p>