Illu / moonwalk

🚀 React-Native App for rocket launches 🛰
https://apps.apple.com/us/app/moonwalk-rocket-launches/id1439376174#?platform=iphone
MIT License
294 stars 48 forks source link

'decorators-legacy' isn't currently enabled #1

Closed kutlay closed 5 years ago

kutlay commented 5 years ago

Hi,

I am getting this error when I try to run the app.

error: bundling failed: SyntaxError: /Users/user/moonwalk-master/src/Models/LaunchesModel.js: Support for the experimental syntax 'decorators-legacy' isn't currently enabled (12:3):

kutlay commented 5 years ago

I solved the problem changing .babelrc to this :

{ "presets": ["module:metro-react-native-babel-preset"], "plugins": [ [ "@babel/plugin-proposal-decorators", { "legacy": true } ] ] }

.babelrc might be a hidden file in Mac, you can edit it using vim command in terminal.