-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React.forwardRef(ActivityIndicator) issue #49056
Comments
Warning Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:
|
is there any solution? |
Hey @shijoavb, I couldn't reproduce the issue in my repository. Please attach a repository or the code to reproduce the same. |
Same problem here, there are many problems of "Missing initializer in const declaration" in many files, not only ActivityIndicator.js (Button.js, SafeAreaView, Switch, InteractionManager...) Please bring some fix on this |
Facing same problem |
still facing same issue |
same here ERROR SyntaxError: /Users/artyomkalantay/WebstormProjects/Paw/node_modules/react-native/Libraries/Components/ActivityIndicator/ActivityIndicator.js: Missing initializer in const declaration. (156:41) 154 | */
|
error SyntaxError: /node_modules/react-native/Libraries/Components/ScrollView/ScrollView.js: Unexpected token, expected "=>" (372:1) 370 | ref?: React.RefSetter<$ReadOnly<{ setNextHeaderY: (number) => void }>>,
FAILURE: Build failed with an exception. |
Facing same problem here |
I have fixed it by adding |
I have that already set. Still have the issue |
do u have |
For me the issue was the package |
Your solution works! node -v: v22.13.1 babel.config.js module.exports = function getBabelConfig(api) {
api.cache(true)
const plugins = []
return {
presets: ['module:@react-native/babel-preset'],
plugins,
}
} package.json ...
"dependencies": {
...
"react-native": "0.77.0",
...
},
"devDependencies": {
"@babel/core": "^7.26.7",
"@babel/preset-env": "^7.26.7",
"@babel/runtime": "^7.26.7",
"@react-native-community/cli": "15.1.3",
"@react-native-community/cli-platform-android": "15.1.3",
"@react-native-community/cli-platform-ios": "15.1.3",
"@react-native/babel-preset": "0.77.0",
"@react-native/eslint-config": "0.77.0",
"@react-native/metro-config": "0.77.0",
"@react-native/typescript-config": "0.77.0",
"@types/jest": "^29.5.14",
"@types/react": "^19.0.8",
"@types/react-test-renderer": "^19.0.0",
"eslint": "^9.19.0",
"jest": "^29.7.0",
"react-test-renderer": "19.0.0",
"typescript": "5.7.3"
},
... I did these commands: npm cache clean --force
rm -rf node_modules package-lock.json
npm install |
Works for me |
Just to be clear, the solution is to add
|
Description
ActivityIndicator/ActivityIndicator.js: Missing initializer in const declaration. (156:41)
154 | */
155 |
Steps to reproduce
Npx react-native run-android
React Native Version
0.77.0
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/
Screenshots and Videos
No response
The text was updated successfully, but these errors were encountered: