-
Notifications
You must be signed in to change notification settings - Fork 634
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
SyntaxError in node_modules/react-native/src/private/animated/NativeAnimatedHelper.js: '}' #1382
Comments
I am also experiencing this. Just upgraded my app to use React Native 0.76.1 |
same error with React Native 0.76.1 |
Related to facebook/react-native#46601. |
@huntie any updates on this issue ? |
@nchkr This should be fixed as of React Native 0.76.1. Please update all your |
After updating RN to 0.76.1 still getting the same error :
|
Yup getting the same error too. I am downgrading back to 0.73.4 |
@nchkr @NoodleOfDeath please update module.exports = {
- presets: ['module:metro-react-native-babel-preset'],
+ presets: ['module:@react-native/babel-preset'],
}; |
The |
const { getDefaultConfig, mergeConfig } = require("@react-native/metro-config"); const defaultConfig = getDefaultConfig(__dirname); /**
module.exports = mergeConfig(defaultConfig, config); |
Cannot resolve the issue Please Help. This is my metro.config.js and Bable.config.js |
In my case it turns that re-running metro bundler it just worked for me: RN 0.76.3
babel.config.js
|
Any tips to debug if/which packages may cause this? Clearing the metro bundler didn't work, along with other potential solutions posted here. |
Experiencing the same error on React Native 0.76.3 |
@obydog002 @DiguinhoLNS did you closed metro console and open it again with |
This should be fixed in RN 0.76.3 with Could anyone still experiencing this after reading the above please post their:
Or even better, a repo I can clone that reproduces this issue. Context: The issue arises when using Babel parser without the Hermes syntax plugin, which is required to parse modern Flow (including the |
package.json: const defaultConfig = getDefaultConfig(__dirname); /**
module.exports = mergeConfig(defaultConfig, config); I tried with hermesParser:false, I'm using expo after upgrading from 51.0.0 to 52.x.x I ran into the issue, node_modules/react-native/src/private/animated/NativeAnimatedHelper.js: '}' |
|
Ah, could well be that Could you try |
For RN 0.76.3 in an Expo project, ensure that you have |
Had this issue and somehow it went away after deleting and regenerating package-lock.json
Files: package.json (relevant sections):
metro.config.js:
babel.config.js:
|
In my case with expo 52 this was fixed after using babel-preset-expo babel.config.js
metro.config.js
package.json excerpt
Thanks |
Hello! I can't find answer that can help with this problem: I see not compilied TypeScript code in javascript file and I think that this will only be solved by re-uploading a fully compiled library. Am I right and what is the time frame for solving the problem? Could you guess? Upd: i drop all types from js file and this error disappeared, but come on other errors from other js-files with not compiled typescript code |
I guess this error due to wrong babelTransformerPath in metro.config.js
at least it works for me :) |
This isn’t the case in general - the default setting should work. Is everyone still experiencing this problem using reanimated? I see a few of you are. |
This helped me after installing expo into bare project (which is using svg) and upgrading it to the latest expo (52.0.23) |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
after bundle.js compilation throw SyntaxError
SyntaxError in node_modules/react-native/src/private/animated/NativeAnimatedHelper.js: '}' expected at end of object literal '{...' (138:9)
}) as $NonMaybeType['getValue'],
^
note: location of '{' (126:12)
const API = {
Please provide your exact Metro configuration and mention your Metro, node, yarn/npm version and operating system.
System:
OS: macOS 14.2.1
CPU: (10) arm64 Apple M2 Pro
Memory: 98.05 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.18.2
path: /usr/local/bin/node
Yarn:
version: 1.22.22
path: /usr/local/bin/yarn
npm:
version: 10.9.0
path: ~/dev/qualicare_0_76_1/node_modules/.bin/npm
Watchman:
version: 2024.04.01.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.14.3
path: /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.5
- iOS 17.5
- macOS 14.5
- tvOS 17.5
- visionOS 1.2
- watchOS 10.5
Android SDK: Not Found
IDEs:
Android Studio: 2024.1 AI-241.15989.150.2411.11948838
Xcode:
version: 15.4/15F31d
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.21
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 15.0.0
wanted: 15.0.0
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.76.1
wanted: 0.76.1
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
The text was updated successfully, but these errors were encountered: