React Native Environment Info:
System:
OS: macOS 10.14
CPU: x64 Intel(R) Core(TM) i7-4960HQ CPU @ 2.60GHz
Memory: 734.07 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.5.0 - ~/.nvm/versions/node/v10.5.0/bin/node
Yarn: 1.9.4 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v10.5.0/bin/npm
Watchman: 4.7.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
Android SDK:
Build Tools: 19.1.0, 23.0.1, 23.0.2, 23.0.3, 24.0.1, 25.0.0, 25.0.1, 25.0.2, 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.2
API Levels: 18, 19, 21, 22, 23, 24, 25, 26, 27, 28
IDEs:
Android Studio: 3.1 AI-173.4907809
Xcode: 10.0/10A255 - /usr/bin/xcodebuild
npmPackages:
@storybook/react-native: latest => 3.4.11
@types/react: latest => 16.4.14
@types/react-native: latest => 0.56.22
react: 16.5.2 => 16.5.2
react-native: 0.57.0
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
Babel 7 has cause some major headaches for us. Because the Google Play store requires new apps to be built against API26 or higher, we had to upgrade from a working build on 55.4 to piles of issues with 0.56+.
After solving issues with decorators, Mobx, and a variety of other issues everything seems to work great now, until we make a release build. Then we get a crash because babelHelpers seems to be missing things. Attached below is the logcat output for android.
E/ReactNativeJS: undefined is not a function (evaluating 'babelHelpers.applyDecoratedDescriptor(t.prototype,"notificationsEnabled",[Ve.serializable],{configurable:!0,enumerable:!0,writable:!0,initializer:null})')
09-17 12:32:48.301 11704-11758/? E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
Process: com.***********, PID: 11704
com.facebook.react.common.JavascriptException: undefined is not a function (evaluating 'babelHelpers.applyDecoratedDescriptor(t.prototype,"notificationsEnabled",[Ve.serializable],{configurable:!0,enumerable:!0,writable:!0,initializer:null})'), stack:
<unknown>@820:1833
Also here is the output on iOS
2018-09-18 18:44:26.571 [error][tid:com.facebook.react.JavaScript] babelHelpers.applyDecoratedDescriptor is not a function. (In 'babelHelpers.applyDecoratedDescriptor(t.prototype,"recoveryKey",[me.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:null})', 'babelHelpers.applyDecoratedDescriptor' is undefined)
2018-09-18 18:44:26.572288-0600 LimbicArcApp[7865:1820384] babelHelpers.applyDecoratedDescriptor is not a function. (In 'babelHelpers.applyDecoratedDescriptor(t.prototype,"recoveryKey",[me.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:null})', 'babelHelpers.applyDecoratedDescriptor' is undefined)
2018-09-18 18:44:26.573 [fatal][tid:com.facebook.react.ExceptionsManagerQueue] Unhandled JS Exception: babelHelpers.applyDecoratedDescriptor is not a function. (In 'babelHelpers.applyDecoratedDescriptor(t.prototype,"recoveryKey",[me.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:null})', 'babelHelpers.applyDecoratedDescriptor' is undefined)
2018-09-18 18:44:26.573160-0600 LimbicArcApp[7865:1820364] Unhandled JS Exception: babelHelpers.applyDecoratedDescriptor is not a function. (In 'babelHelpers.applyDecoratedDescriptor(t.prototype,"recoveryKey",[me.observable],{configurable:!0,enumerable:!0,writable:!0,initializer:null})', 'babelHelpers.applyDecoratedDescriptor' is undefined)
Here is my package.json:
{
"name": "LimbicArcApp",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest",
"storybook": "storybook start -p 7007",
"ios": "react-native run-ios",
"android": "react-native run-android"
},
"dependencies": {
"@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/polyfill": "^7.0.0",
"@babel/runtime": "^7.0.0",
"@types/react-native-push-notification": "^3.0.2",
"appcenter": "^1.8.1",
"appcenter-analytics": "^1.8.1",
"appcenter-crashes": "^1.8.1",
"color": "^3.0.0",
"enzyme": "^3.6.0",
"es6-symbol": "^3.1.1",
"eslint-plugin-react-native": "^3.3.0",
"firebase": "^5.5.0",
"install": "^0.12.0",
"javascript-state-machine": "^3.1.0",
"jsc-android": "224109.x.x",
"lodash": "^4.17.10",
"lodash.isequal": "^4.5.0",
"mobx": "^4.4.1",
"mobx-react": "^5.2.8",
"mobx-react-devtools": "^5.0.1",
"moment": "^2.22.2",
"native-base": "^2.8.0",
"npm": "^6.1.0",
"prop-types": "^15.6.2",
"react": "16.5.2",
"react-base": "^0.2.0",
"react-native": "0.57.0",
"react-native-elements": "^0.19.1",
"react-native-email-link": "^1.1.0",
"react-native-event-listeners": "^1.0.3",
"react-native-layout-debug": "^1.1.1",
"react-native-modal": "^6.5.0",
"react-native-modal-datetime-picker": "^6.0.0",
"react-native-modal-selector": "0.0.29",
"react-native-orientation-loading-overlay": "^0.1.4",
"react-native-page-control": "^1.1.1",
"react-native-push-notification": "^3.1.1",
"react-native-router-flux": "^4.0.1",
"react-native-simple-store": "^1.3.0",
"react-native-swipable": "0.0.2",
"react-native-swipeable": "^0.6.0",
"react-native-textinput-effects": "^0.4.2",
"react-native-vector-icons": "^5.0.0",
"react-navigation": "^2.14.2",
"serializr": "^1.3.0",
"util": "^0.11.0"
},
"devDependencies": {
"@babel/cli": "^7.1.0",
"@babel/core": "^7.1.0",
"@babel/plugin-transform-runtime": "^7.1.0",
"@babel/preset-env": "^7.1.0",
"@storybook/addon-actions": "latest",
"@storybook/addon-links": "latest",
"@storybook/addons": "latest",
"@storybook/react-native": "latest",
"@types/jest": "^23.1.2",
"@types/react": "latest",
"@types/react-native": "latest",
"@types/react-test-renderer": "latest",
"eslint": "^4.19.1",
"eslint-config-airbnb": "^16.1.0",
"eslint-plugin-babel": "^5.1.0",
"eslint-plugin-import": "^2.12.0",
"eslint-plugin-jsx-a11y": "^6.0.3",
"eslint-plugin-react": "^7.9.1",
"jest": "22.4.4",
"prettier": "1.13.5",
"react-addons-test-utils": "^15.6.2",
"react-dom": "16.3.1",
"react-native-typescript-transformer": "^1.2.10",
"react-test-renderer": "16.3.1",
"ts-jest": "^22.4.6",
"typescript": "^3.0.1"
},
"jest": {
"preset": "react-native",
"moduleFileExtensions": [
"ts",
"tsx",
"js"
],
"transform": {
"^.+\\.(js)$": "<rootDir>/node_modules/babel-jest",
"\\.(ts|tsx)$": "<rootDir>/node_modules/ts-jest/preprocessor.js"
},
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
"testPathIgnorePatterns": [
"\\.snap$",
"<rootDir>/node_modules/"
],
"cacheDirectory": ".jest/cache",
"setupFiles": [
"./node_modules/appcenter/test/AppCenterMock.js",
"./node_modules/appcenter-analytics/test/AppCenterAnalyticsMock.js",
"./node_modules/appcenter-crashes/test/AppCenterCrashesMock.js",
"<rootDir>/node_modules/appcenter/test/AppCenterMock.js",
"<rootDir>/node_modules/appcenter-crashes/test/AppCenterCrashesMock.js",
"<rootDir>/node_modules/appcenter-analytics/test/AppCenterAnalyticsMock.js"
]
},
"rnpm": {
"assets": [
"./assets/fonts/"
]
}
}
And .bablerc
{
"plugins": [[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
]],
"presets": ["module:metro-react-native-babel-preset"]
}
It looks like you are using an older version of React Native. Please update to the latest release, v0.57 and verify if the issue still exists.
The ":rewind:Old Version" label will be removed automatically once you edit your original post with the results of running react-native info on a project using the latest release.
No react-native-bot, 0.57.0 is in fact 0.57.0...
i have same issue..
i 've come up with a workaround.
https://github.com/facebook/react-native/issues/20150#issue-340235017
Please refer to https://github.com/facebook/react-native/issues/19955#issuecomment-421295617
me too. release build
2018-10-04 22:43:08.073 [error][tid:com.facebook.react.JavaScript] undefined is not a function (near '...babelHelpers.applyDecoratedDescriptor...')
close? it has bug yet.
Can this be reopened, facing exactly the same issue as @bzeeman
bump +1
Most helpful comment
No react-native-bot, 0.57.0 is in fact 0.57.0...