App.js: Cannot read property 'filename' of undefined after update sdk to 31.0.0

After updating your Android SDK

Tue, 08 Jan 2019

This error has to do with a .babelrc config. Luckily for us, the fix is real quick. What you want to do is change your babel file.

Old babel file

{
  "presets": ["babel-preset-expo"],
  "env": {
    "development": {
      "plugins": ["transform-react-jsx-source"]
    },
    "production": {
      "plugins": ["transform-remove-console"]
    }
  }
}

New babel file

{
  "presets": ["babel-preset-expo"],
  "env": {
    "development": {
      "plugins": []
    },
    "production": {
      "plugins": ["transform-remove-console"]
    }
  }
}
Buy Me A CoffeeDigitalOcean Referral Badge
Loading...
Edward Beazer

Edward Beazer - I just like to build shit. Sometimes I get stuck for hours, even days while trying to figure out how to solve an issue or implement a new feature. Hope my tips and tutorials can save you some time.

DigitalOcean Referral Badge