title: React Native Metro Bundler issue with invalid left side AssingmentExpression
body: <p>I'm just simply trying to start metro bundler to serve the app. Here's the error:</p>
  
  <pre><code>TypeError: Property left of AssignmentExpression expected node to be of a type ["LVal"] but instead got "StringLiteral"
  at Object.validate (/Users/tyler/Code/.../node_modules/@babel/types/lib/definitions/utils.js:128:13)
  at Object.validate (/Users/tyler/Code/.../node_modules/@babel/types/lib/validators/validate.js:17:9)
  at NodePath._replaceWith (/Users/tyler/Code/.../node_modules/@babel/traverse/lib/path/replacement.js:194:9)
  at NodePath.replaceWith (/Users/tyler/Code/.../node_modules/@babel/traverse/lib/path/replacement.js:178:8)
  at PluginPass.MemberExpression (/Users/tyler/Code/.../node_modules/babel-plugin-transform-inline-environment-variables/lib/index.js:19:18)
  at newFn (/Users/tyler/Code/.../node_modules/@babel/traverse/lib/visitors.js:193:21)
  at NodePath._call (/Users/tyler/Code/.../node_modules/@babel/traverse/lib/path/context.js:53:20)
  at NodePath.call (/Users/tyler/Code/.../node_modules/@babel/traverse/lib/path/context.js:40:17)
  at NodePath.visit (/Users/tyler/Code/.../node_modules/@babel/traverse/lib/path/context.js:88:12)
  at TraversalContext.visitQueue (/Users/tyler/Code/.../node_modules/@babel/traverse/lib/context.js:118:16)
  </code></pre>
  
  <p>which means something like <code>Platform.OS = "ios"</code> is transformed into <code>"ios" = "ios"</code>: <a href="https://github.com/facebook/metro/pull/45" rel="nofollow noreferrer">like so</a> &lt;- That PR also addresses the TypeError being thrown  for the process.env which seems to be the case for me. My stack trace references <code>...babel-plugin-transform-inline-environment-variables/lib/index.js:19:18</code> which deals exclusively with setting process.env. There are only two places in my code using a var from process.env and neither are used on the left side of an assignment. </p>
  
  <p>PR 45 for the metro bundler was merged way back in 2017 though. And I'm using the latest version btw, this is occurring when trying to start up the bundler with the script <code>"NODE_ENV=development npm start -- --reset-cache"</code>. Note that I am using the reset cache flag as mentiond <a href="https://github.com/react-community/create-react-native-app/issues/57#issuecomment-365557303" rel="nofollow noreferrer">here</a></p>
  
  <p>A coworker suggested the error may be cause by a react-native plugin, but I haven't uncovered it yet if that is the case. We did just migrate this app to Babel 7, fyi. I'm hitting a wall now on ideas and the google trail is growing stale. What else could be the cause of this error? </p>
  
  <p>Here are the dependencies from my package.json in case it helps:</p>
  
  <pre><code>}
   ...
   "dependencies": {
     "@babel/runtime": "^7.0.0",
     "lodash.capitalize": "^4.2.1",
     "lodash.debounce": "^4.0.8",
     "lodash.find": "^4.6.0",
     "phoenix": "^1.3.4",
     "prettier": "^1.14.2",
     "prop-types": "^15.6.2",
     "react": "^16.4.2",
     "react-native": "0.57.0",
     "react-native-firebase": "^4.3.8",
     "react-native-keep-awake": "^3.1.0",
     "react-native-linear-gradient": "^2.4.2",
     "react-native-router-flux": "^4.0.1",
     "react-native-swiper": "^1.5.13",
     "react-native-tts": "^2.0.0",
     "react-redux": "^5.0.7",
     "redux": "^4.0.0",
     "redux-thunk": "^2.3.0",
     "spokestack-react-native": "0.0.2"
   },
   "devDependencies": {
     "@babel/plugin-proposal-object-rest-spread": "^7.0.0",
     "@babel/plugin-transform-runtime": "^7.0.0",
     "babel-core": "^7.0.0-bridge.0",
     "babel-plugin-transform-inline-environment-variables": "^0.4.3",
     "imagemin": "^6.0.0",
     "imagemin-jpegtran": "^5.0.2",
     "imagemin-optipng": "^5.2.1",
     "imagemin-svgo": "^7.0.0",
     "jest": "^23.6.0",
     "metro-react-native-babel-preset": "^0.45.2",
     "pre-commit": "^1.2.2",
     "precise-commits": "^1.0.2",
     "react-test-renderer": "^16.4.2",
     "redux-mock-store": "^1.5.3"
    },
    ...
  }
  </code></pre>
  
  <p>...and additionally, the <code>babel.config.js</code> as per babel 7</p>
  
  <pre><code>module.exports = {
    presets: ['module:metro-react-native-babel-preset'],
    plugins: [
      '@babel/plugin-transform-runtime',
      '@babel/plugin-proposal-object-rest-spread',
      'transform-inline-environment-variables'
    ]
  }
  </code></pre>
  
  <p>UPDATE: I used grep within the react-* packages to find additional lines where process.env were used as a lefthand assignment. Only found a few, but couldn't resolve the issue.</p>