SyntaxError in node_modules/react-native/src/private/animated/NativeAnimatedHelper.js: '}'
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<typeof NativeAnimatedModule>['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
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 https://github.com/facebook/react-native/issues/46601.
@huntie any updates on this issue ?
@nchkr This should be fixed as of React Native 0.76.1. Please update all your @react-native/* deps (the fix is part of @react-native/babel-preset).
After updating RN to 0.76.1 still getting the same error :
SyntaxError: /node_modules/react-native/src/private/animated/NativeAnimatedHelper.js: Unexpected token, expected "," (138:9)
136 | : (tag, saveValueCallback) => {
137 | NativeOperations.getValue(tag, saveValueCallback);
> 138 | }) as $NonMaybeType<typeof NativeAnimatedModule>['getValue'],
| ^
139 |
140 | setWaitingForIdentifier(id: string): void {
141 | waitingForQueuedOperations.add(id);
Yup getting the same error too. I am downgrading back to 0.73.4
@nchkr @NoodleOfDeath please update babel.config.js
module.exports = {
- presets: ['module:metro-react-native-babel-preset'],
+ presets: ['module:@react-native/babel-preset'],
};
The babel.config.js alone did not fix it on my side. It had to do with react-native-svg-transformer. I npm i react-native-svg-transformer@latest and it started working
const { getDefaultConfig, mergeConfig } = require("@react-native/metro-config");
const defaultConfig = getDefaultConfig(__dirname); const { assetExts, sourceExts } = defaultConfig.resolver;
/**
-
Metro configuration
-
https://facebook.github.io/metro/docs/configuration
-
@type {import('metro-config').MetroConfig} */ const config = { transformer: { babelTransformerPath: require.resolve("react-native-svg-transformer"),
assetPlugins: ["expo-asset/tools/hashAssetFiles"], getTransformOptions: async () => ({ transform: { experimentalImportSupport: false, inlineRequires: false, }, }), }, resolver: { assetExts: assetExts.filter((ext) => ext !== "svg"), sourceExts: [...sourceExts, "json", "svg"], }, };
module.exports = mergeConfig(defaultConfig, config);
Cannot resolve the issue Please Help. This is my metro.config.js and Bable.config.js module.exports = function(api) { api.cache(true); return { presets: ['babel-preset-expo'], plugins: ['react-native-reanimated/plugin'], }; };
In my case it turns that re-running metro bundler it just worked for me: yarn start --reset-cache
RN 0.76.3 package.json
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.3",
"@babel/runtime": "^7.23.6",
"@react-native-community/cli": "15.0.0",
"@react-native-community/cli-platform-android": "15.0.0",
"@react-native-community/cli-platform-ios": "15.0.0",
"@react-native/babel-preset": "0.76.3",
"@react-native/eslint-config": "0.76.3",
"@react-native/metro-config": "0.76.3",
"@react-native/typescript-config": "0.76.3",
"@types/react": "^18.2.6",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.6.3",
"babel-plugin-transform-remove-console": "^6.9.4",
"eslint": "^8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"jest": "^29.6.3",
"metro-react-native-babel-preset": "^0.77.0",
"patch-package": "^7.0.2",
"postinstall-postinstall": "^2.1.0",
"prettier": "^2.8.8",
"react-native-dotenv": "^3.4.11",
"react-test-renderer": "18.3.1",
"typescript": "5.3.3"
},
babel.config.js
module.exports = function (api) {
api.cache(false);
return {
presets: ['module:@react-native/babel-preset'],
plugins: [
'react-native-reanimated/plugin',
['module:react-native-dotenv', {
envName: 'APP_ENV',
moduleName: '@env',
path: '.env'
}]
]
}
}
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 yarn start --reset-cache?
This should be fixed in RN 0.76.3 with hermesParser: false in metro.config.js. Please see https://github.com/facebook/hermes/issues/1549#issuecomment-2478698376
Could anyone still experiencing this after reading the above please post their:
package.jsonmetro.config.jsbabel.config.js(or other Babel config)yarn why @react-native/babel-presetyarn why metro
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 as keyword). This should be automatically set up by @react-native/babel-preset, which should match your react-native version and be up-to-date.
package.json: metro.config.js `const { getDefaultConfig, mergeConfig } = require("@react-native/metro-config");
const defaultConfig = getDefaultConfig(__dirname); const { assetExts, sourceExts } = defaultConfig.resolver;
/**
-
Metro configuration
-
https://facebook.github.io/metro/docs/configuration
-
@type {import('metro-config').MetroConfig} */ const config = { transformer: { hermesParser:false, babelTransformerPath: require.resolve("react-native-svg-transformer"),
assetPlugins: ["expo-asset/tools/hashAssetFiles"], getTransformOptions: async () => ({ transform: { experimentalImportSupport: false, inlineRequires: false, }, }), }, resolver: { assetExts: assetExts.filter((ext) => ext !== "svg"), sourceExts: [...sourceExts, "json", "svg"], }, };
module.exports = mergeConfig(defaultConfig, config);
Babnel.config.jsonmodule.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
plugins: ['react-native-reanimated/plugin'],
};
};
`
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: '}'
"name": "frontend",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"ts:check": "tsc",
"start": "expo start",
"android": "expo run:android",
"ios": "expo run:ios",
"web": "expo start --web"
},
"dependencies": {
"@expo/metro-runtime": "~3.2.1",
"@react-native/metro-config": "^0.73.5",
"@react-navigation/bottom-tabs": "^6.6.1",
"@react-navigation/native": "^6.1.18",
"@react-navigation/native-stack": "^6.11.0",
"axios": "^1.6.7",
"colorsys": "^1.0.22",
"expo": "^51.0.0",
"expo-asset": "~10.0.9",
"expo-dev-client": "~4.0.18",
"expo-font": "~12.0.7",
"expo-haptics": "~13.0.1",
"expo-linear-gradient": "~13.0.2",
"expo-status-bar": "~1.12.1",
"expo-system-ui": "~3.0.6",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.74.2",
"react-native-gesture-handler": "^2.20.2",
"react-native-ios-kit": "^0.0.22",
"react-native-loading-spinner-overlay": "^3.0.1",
"react-native-progress": "^5.0.1",
"react-native-reanimated": "^3.16.1",
"react-native-responsive-screen": "^1.4.2",
"react-native-safe-area-context": "4.10.5",
"react-native-screens": "3.31.1",
"react-native-svg": "15.2.0",
"react-native-svg-path-gradient": "^0.4.0",
"react-native-toast-message": "^2.2.0",
"react-native-vector-icons": "^10.2.0",
"react-native-web": "~0.19.6",
"toggle-switch-react-native": "^3.3.0",
"use-debounce": "^10.0.0",
"zustand": "^4.5.2"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@types/react": "~18.2.45",
"react-native-svg-transformer": "^1.3.0",
"typescript": "~5.3.3"
},
"private": true
}
`
Ah, could well be that babel-preset-expo doesn’t include babel-plugin-syntax-hermes-parser.
Could you try
yarn add babel-plugin-syntax-hermes-parser
And add 'babel-plugin-syntax-hermes-parser' as the first entry in babel.config.js plugins?
For RN 0.76.3 in an Expo project, ensure that you have babel-preset-expo at 12.0.2 or later (check with yarn why babel-preset-expo)
Had this issue and somehow it went away after deleting and regenerating package-lock.json
~Running into this even after:~
- ~Ensuring babel-preset-expo is at 12.0.2~
- ~RN is 0.76.3~
- ~hermesParser is set to false in metro.config.js~
- ~Have tried
expo start --reset-cacheoption~
Files:
package.json (relevant sections):
{
"dependencies": {
"@sentry/react-native": "^5.33.0",
"babel-plugin-syntax-hermes-parser": "^0.25.1",
"babel-preset-expo": "^12.0.2",
"expo": "^52.0.11",
"react": "^18.3.1",
"react-native": "^0.76.3",
"react-native-paper": "^5.12.3",
"react-native-reanimated": "^3.16.3",
},
"devDependencies": {
"@babel/core": "^7.26.0",
"babel-plugin-module-resolver": "^5.0.2",
"metro-react-native-babel-transformer": "^0.77.0",
"react-native-svg-transformer": "^1.5.0",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
}
}
metro.config.js:
/* eslint-disable require-unicode-regexp */
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require("path");
const { getSentryExpoConfig } = require("@sentry/react-native/metro");
module.exports = (() => {
const config = getSentryExpoConfig(__dirname);
const { transformer, resolver } = config;
config.transformer = {
...transformer,
hermesParser: false,
babelTransformerPath: require.resolve("react-native-svg-transformer"),
};
config.resolver = {
...resolver,
assetExts: resolver.assetExts.filter(ext => ext !== "svg"),
sourceExts: [...resolver.sourceExts, "svg"],
};
return config;
})();
babel.config.js:
module.exports = function (api) {
api.cache(true);
return {
presets: ["babel-preset-expo"],
env: {
production: {
plugins: ["react-native-paper/babel"],
},
},
plugins: [
["babel-plugin-syntax-hermes-parser"],
[
"module-resolver",
{
extensions: [".ts", ".tsx", ".js", ".jsx"],
root: ["./"],
},
],
"react-native-reanimated/plugin",
],
};
};
npm why babel-preset-expo
[email protected]
In my case with expo 52 this was fixed after using babel-preset-expo
babel.config.js
module.exports = {
presets: ['babel-preset-expo'],
plugins: ['react-native-reanimated/plugin'],
};
metro.config.js
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
/**
* Metro configuration
* https://reactnative.dev/docs/metro
*
* @type {import('metro-config').MetroConfig}
*/
const config = {transformer: {hermesParser: false}};
module.exports = mergeConfig(getDefaultConfig(__dirname), config);
package.json excerpt
"@babel/preset-env": "^7.25.3",
"babel-plugin-syntax-hermes-parser": "^0.25.1",
"babel-preset-expo": "^12.0.2"
Thanks
Related to facebook/react-native#46601.
Hello! I can't find answer that can help with this problem: SyntaxError in node_modules/react-native/src/private/animated/NativeAnimatedHelper.js: '}'
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 Look carifully at your metro.config.js For react-native > 0.72 must be:
babelTransformerPath: require.resolve("react-native-svg-transformer/react-native"),
at least it works for me :)
I guess this error due to wrong babelTransformerPath in metro.config.js Look carifully at your metro.config.js For react-native > 0.72 must be:
babelTransformerPath: require.resolve("react-native-svg-transformer/react-native"),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.
I guess this error due to wrong babelTransformerPath in metro.config.js Look carifully at your metro.config.js For react-native > 0.72 must be:
babelTransformerPath: require.resolve("react-native-svg-transformer/react-native"),at least it works for me :)
This helped me after installing expo into bare project (which is using svg) and upgrading it to the latest expo (52.0.23)
package.json { "name": "@simple-mono/source", "version": "0.0.0", "license": "MIT", "scripts": { "generate-sdk": "npx mst-gql --format ts https://dev-api.changotest.com/graphql --outDir=./simple-sdk/src/store", "run-all-next": "nx run-many --target=dev --all", "run-mobile": "nx run mobile-user-app:start" }, "private": true, "dependencies": { "@expo/metro-config": "~0.19.0", "@expo/metro-runtime": "~4.0.1", "@react-native-async-storage/async-storage": "1.23.1", "@react-native-community/cli-server-api": "^15.1.3", "@react-native-community/datetimepicker": "8.2.0", "@react-native-community/netinfo": "11.4.1", "@react-navigation/bottom-tabs": "^6.5.12", "@react-navigation/material-top-tabs": "^6.6.14", "@react-navigation/native": "^6.1.9", "@react-navigation/native-stack": "^6.9.17", "@rneui/base": "^4.0.0-rc.7", "@rneui/themed": "^4.0.0-rc.8", "@shopify/flash-list": "1.7.3", "axios": "^1.6.7", "deepmerge": "^4.3.1", "expo": "^52.0.37", "expo-camera": "~16.0.17", "expo-dev-client": "~5.0.12", "expo-document-picker": "~13.0.3", "expo-font": "~13.0.4", "expo-image": "~2.0.6", "expo-image-picker": "~16.0.6", "expo-linear-gradient": "~14.0.2", "expo-linking": "~7.0.5", "expo-location": "~18.0.7", "expo-splash-screen": "~0.29.22", "expo-status-bar": "~2.0.1", "expo-web-browser": "~14.0.2", "graphql": "^16.8.1", "graphql-request": "^6.1.0", "graphql-tag": "^2.12.6", "mobx": "^6.12.0", "mobx-react": "^9.1.0", "mobx-state-tree": "^5.4.1", "mst-gql": "^0.17.2", "next": "14.0.4", "react": "18.3.1", "react-dom": "18.3.1", "react-native": "0.76.7", "react-native-keyboard-controller": "^1.15.2", "react-native-maps": "1.18.0", "react-native-pager-view": "6.5.1", "react-native-reanimated": "~3.16.1", "react-native-safe-area-context": "4.12.0", "react-native-screens": "~4.4.0", "react-native-svg": "15.8.0", "react-native-tab-view": "^3.5.2", "react-native-webview": "13.12.5", "tslib": "^2.3.0" }, "devDependencies": { "@babel/core": "^7.24.0", "@babel/preset-react": "^7.14.5", "@expo/cli": "~0.16.5", "@nx/cypress": "18.0.4", "@nx/eslint": "18.0.4", "@nx/eslint-plugin": "18.0.4", "@nx/expo": "^18.0.4", "@nx/jest": "18.0.4", "@nx/js": "18.0.4", "@nx/next": "18.0.4", "@nx/react": "18.0.4", "@nx/react-native": "^18.0.4", "@nx/web": "18.0.4", "@nx/workspace": "18.0.4", "@react-native-community/cli-platform-android": "12.3.0", "@react-native/babel-preset": "^0.73.18", "@react-native/metro-config": "^0.73.2", "@swc-node/register": "~1.8.0", "@swc/cli": "~0.1.62", "@swc/core": "~1.3.85", "@swc/helpers": "~0.5.2", "@testing-library/jest-native": "~5.4.3", "@testing-library/react": "14.0.0", "@testing-library/react-native": "~12.4.2", "@types/jest": "^29.4.0", "@types/node": "18.16.9", "@types/react": "~18.3.12", "@types/react-dom": "~18.3.1", "@typescript-eslint/eslint-plugin": "^6.13.2", "@typescript-eslint/parser": "^6.13.2", "babel-jest": "^29.4.1", "babel-preset-expo": "~12.0.0", "cypress": "^13.0.0", "eslint": "~8.48.0", "eslint-config-next": "14.0.4", "eslint-config-prettier": "^9.0.0", "eslint-plugin-cypress": "^2.13.4", "eslint-plugin-import": "2.27.5", "eslint-plugin-jsx-a11y": "6.7.1", "eslint-plugin-react": "7.32.2", "eslint-plugin-react-hooks": "4.6.0", "jest": "^29.4.1", "jest-environment-jsdom": "^29.4.1", "jest-expo": "~52.0.4", "jest-react-native": "18.0.0", "nx": "18.0.4", "prettier": "^2.6.2", "react-native-web": "^0.19.9", "react-test-renderer": "18.2.0", "ts-jest": "^29.1.0", "ts-node": "10.9.1", "typescript": "~5.3.2" } }
metro.config.js const { withNxMetro } = require('@nx/expo'); const { getDefaultConfig } = require('@expo/metro-config'); const { mergeConfig } = require('metro-config');
const defaultConfig = getDefaultConfig(__dirname); const { assetExts, sourceExts } = defaultConfig.resolver;
/**
- Metro configuration
- https://facebook.github.io/metro/docs/configuration
- @type {import('metro-config').MetroConfig} */ const customConfig = { resolver: { assetExts: assetExts, sourceExts: [...sourceExts, 'cjs', 'mjs'], }, };
module.exports = withNxMetro(mergeConfig(defaultConfig, customConfig), {
debug: false, extensions: [], watchFolders: [], });
babel.config.json { "babelrcRoots": ["*"] }
npm why @react-native/babel-preset @react-native/[email protected] dev node_modules/@react-native/babel-preset dev @react-native/babel-preset@"^0.73.18" from the root project peer @react-native/babel-preset@"*" from @expo/[email protected] node_modules/@expo/cli/node_modules/@expo/metro-config @expo/metro-config@"~0.17.0" from @expo/[email protected] node_modules/@expo/cli dev @expo/cli@"~0.16.5" from the root project @react-native/babel-preset@"0.73.21" from @react-native/[email protected] node_modules/@react-native/metro-babel-transformer @react-native/metro-babel-transformer@"0.73.15" from @react-native/[email protected] node_modules/@react-native/metro-config dev @react-native/metro-config@"^0.73.2" from the root project
@react-native/[email protected] node_modules/@react-native/community-cli-plugin/node_modules/@react-native/babel-preset @react-native/babel-preset@"0.76.7" from @react-native/[email protected] node_modules/@react-native/community-cli-plugin/node_modules/@react-native/metro-babel-transformer @react-native/metro-babel-transformer@"0.76.7" from @react-native/[email protected] node_modules/@react-native/community-cli-plugin @react-native/community-cli-plugin@"0.76.7" from [email protected] node_modules/react-native react-native@"0.76.7" from the root project peer react-native@"" from @expo/[email protected] node_modules/@expo/metro-runtime @expo/metro-runtime@"~4.0.1" from the root project peerOptional @expo/metro-runtime@"" from [email protected] node_modules/expo expo@"^52.0.37" from the root project peerOptional expo@">=50.0.0" from @react-native-community/[email protected] node_modules/@react-native-community/datetimepicker @react-native-community/datetimepicker@"8.2.0" from the root project peer expo@"" from [email protected] node_modules/expo-asset expo-asset@"~11.0.4" from [email protected] peer expo@"" from [email protected] node_modules/expo-camera expo-camera@"~16.0.17" from the root project peer expo@"" from [email protected] node_modules/expo-constants expo-constants@"~17.0.7" from [email protected] expo-constants@"~17.0.7" from [email protected] node_modules/expo-asset expo-asset@"~11.0.4" from [email protected] expo-constants@"~17.0.5" from [email protected] node_modules/expo-linking expo-linking@"~7.0.5" from the root project peer expo@"" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-dev-launcher expo-dev-launcher@"5.0.29" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-dev-menu expo-dev-menu@"6.0.19" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project expo-dev-menu@"6.0.19" from [email protected] node_modules/expo-dev-launcher expo-dev-launcher@"5.0.29" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-dev-menu-interface expo-dev-menu-interface@"1.9.3" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project expo-dev-menu-interface@"1.9.3" from [email protected] node_modules/expo-dev-menu expo-dev-menu@"6.0.19" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project expo-dev-menu@"6.0.19" from [email protected] node_modules/expo-dev-launcher expo-dev-launcher@"5.0.29" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-document-picker expo-document-picker@"~13.0.3" from the root project peer expo@"" from [email protected] node_modules/expo-file-system expo-file-system@"~18.0.11" from [email protected] peer expo@"" from [email protected] node_modules/expo-font expo-font@"~13.0.4" from the root project expo-font@"~13.0.4" from [email protected] peer expo@"" from [email protected] node_modules/expo-image expo-image@"~2.0.6" from the root project peer expo@"" from [email protected] node_modules/expo-image-loader expo-image-loader@"~5.0.0" from [email protected] node_modules/expo-image-picker expo-image-picker@"~16.0.6" from the root project peer expo@"" from [email protected] node_modules/expo-image-picker expo-image-picker@"~16.0.6" from the root project peer expo@"" from [email protected] node_modules/expo-keep-awake expo-keep-awake@"~14.0.3" from [email protected] peer expo@"" from [email protected] node_modules/expo-linear-gradient expo-linear-gradient@"~14.0.2" from the root project peer expo@"" from [email protected] node_modules/expo-location expo-location@"~18.0.7" from the root project peer expo@"" from [email protected] node_modules/expo-manifests expo-manifests@"~0.15.5" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project expo-manifests@"~0.15.5" from [email protected] node_modules/expo-dev-launcher expo-dev-launcher@"5.0.29" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-splash-screen expo-splash-screen@"~0.29.22" from the root project peer expo@"" from [email protected] node_modules/expo-updates-interface expo-updates-interface@"~1.0.0" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-web-browser expo-web-browser@"~14.0.2" from the root project peer expo@"" from [email protected] node_modules/jest-expo dev jest-expo@"~52.0.4" from the root project peer react-native@"^0.0.0-0 || >=0.60 <1.0" from @react-native-async-storage/[email protected] node_modules/@react-native-async-storage/async-storage @react-native-async-storage/async-storage@"1.23.1" from the root project peer react-native@"" from @react-native-community/[email protected] node_modules/@react-native-community/datetimepicker @react-native-community/datetimepicker@"8.2.0" from the root project peer react-native@">=0.59" from @react-native-community/[email protected] node_modules/@react-native-community/netinfo @react-native-community/netinfo@"11.4.1" from the root project peer react-native@"" from @react-native/[email protected] node_modules/@react-native/virtualized-lists @react-native/virtualized-lists@"0.76.7" from [email protected] peer react-native@"" from @react-navigation/[email protected] node_modules/@react-navigation/bottom-tabs @react-navigation/bottom-tabs@"^6.5.12" from the root project peer react-native@"" from @react-navigation/[email protected] node_modules/@react-navigation/elements @react-navigation/elements@"^1.3.31" from @react-navigation/[email protected] node_modules/@react-navigation/bottom-tabs @react-navigation/bottom-tabs@"^6.5.12" from the root project @react-navigation/elements@"^1.3.31" from @react-navigation/[email protected] node_modules/@react-navigation/native-stack @react-navigation/native-stack@"^6.9.17" from the root project peer react-native@"" from @react-navigation/[email protected] node_modules/@react-navigation/material-top-tabs @react-navigation/material-top-tabs@"^6.6.14" from the root project peer react-native@"" from @react-navigation/[email protected] node_modules/@react-navigation/native @react-navigation/native@"^6.1.9" from the root project peer @react-navigation/native@"^6.0.0" from @react-navigation/[email protected] node_modules/@react-navigation/bottom-tabs @react-navigation/bottom-tabs@"^6.5.12" from the root project peer @react-navigation/native@"^6.0.0" from @react-navigation/[email protected] node_modules/@react-navigation/elements @react-navigation/elements@"^1.3.31" from @react-navigation/[email protected] node_modules/@react-navigation/bottom-tabs @react-navigation/bottom-tabs@"^6.5.12" from the root project @react-navigation/elements@"^1.3.31" from @react-navigation/[email protected] node_modules/@react-navigation/native-stack @react-navigation/native-stack@"^6.9.17" from the root project peer @react-navigation/native@"^6.0.0" from @react-navigation/[email protected] node_modules/@react-navigation/material-top-tabs @react-navigation/material-top-tabs@"^6.6.14" from the root project peer @react-navigation/native@"^6.0.0" from @react-navigation/[email protected] node_modules/@react-navigation/native-stack @react-navigation/native-stack@"^6.9.17" from the root project peer react-native@"" from @react-navigation/[email protected] node_modules/@react-navigation/native-stack @react-navigation/native-stack@"^6.9.17" from the root project peer react-native@"" from @shopify/[email protected] node_modules/@shopify/flash-list @shopify/flash-list@"1.7.3" from the root project peer react-native@">=0.59" from @testing-library/[email protected] node_modules/@testing-library/jest-native dev @testing-library/jest-native@"~5.4.3" from the root project peer react-native@">=0.59" from @testing-library/[email protected] node_modules/@testing-library/react-native dev @testing-library/react-native@"~12.4.2" from the root project peer react-native@"" from [email protected] node_modules/expo expo@"^52.0.37" from the root project peerOptional expo@">=50.0.0" from @react-native-community/[email protected] node_modules/@react-native-community/datetimepicker @react-native-community/datetimepicker@"8.2.0" from the root project peer expo@"" from [email protected] node_modules/expo-asset expo-asset@"~11.0.4" from [email protected] peer expo@"" from [email protected] node_modules/expo-camera expo-camera@"~16.0.17" from the root project peer expo@"" from [email protected] node_modules/expo-constants expo-constants@"~17.0.7" from [email protected] expo-constants@"~17.0.7" from [email protected] node_modules/expo-asset expo-asset@"~11.0.4" from [email protected] expo-constants@"~17.0.5" from [email protected] node_modules/expo-linking expo-linking@"~7.0.5" from the root project peer expo@"" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-dev-launcher expo-dev-launcher@"5.0.29" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-dev-menu expo-dev-menu@"6.0.19" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project expo-dev-menu@"6.0.19" from [email protected] node_modules/expo-dev-launcher expo-dev-launcher@"5.0.29" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-dev-menu-interface expo-dev-menu-interface@"1.9.3" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project expo-dev-menu-interface@"1.9.3" from [email protected] node_modules/expo-dev-menu expo-dev-menu@"6.0.19" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project expo-dev-menu@"6.0.19" from [email protected] node_modules/expo-dev-launcher expo-dev-launcher@"5.0.29" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-document-picker expo-document-picker@"~13.0.3" from the root project peer expo@"" from [email protected] node_modules/expo-file-system expo-file-system@"~18.0.11" from [email protected] peer expo@"" from [email protected] node_modules/expo-font expo-font@"~13.0.4" from the root project expo-font@"~13.0.4" from [email protected] peer expo@"" from [email protected] node_modules/expo-image expo-image@"~2.0.6" from the root project peer expo@"" from [email protected] node_modules/expo-image-loader expo-image-loader@"~5.0.0" from [email protected] node_modules/expo-image-picker expo-image-picker@"~16.0.6" from the root project peer expo@"" from [email protected] node_modules/expo-image-picker expo-image-picker@"~16.0.6" from the root project peer expo@"" from [email protected] node_modules/expo-keep-awake expo-keep-awake@"~14.0.3" from [email protected] peer expo@"" from [email protected] node_modules/expo-linear-gradient expo-linear-gradient@"~14.0.2" from the root project peer expo@"" from [email protected] node_modules/expo-location expo-location@"~18.0.7" from the root project peer expo@"" from [email protected] node_modules/expo-manifests expo-manifests@"~0.15.5" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project expo-manifests@"~0.15.5" from [email protected] node_modules/expo-dev-launcher expo-dev-launcher@"5.0.29" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-splash-screen expo-splash-screen@"~0.29.22" from the root project peer expo@"" from [email protected] node_modules/expo-updates-interface expo-updates-interface@"~1.0.0" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-web-browser expo-web-browser@"~14.0.2" from the root project peer expo@"" from [email protected] node_modules/jest-expo dev jest-expo@"~52.0.4" from the root project peer react-native@"" from [email protected] node_modules/expo-asset expo-asset@"~11.0.4" from [email protected] peer react-native@"" from [email protected] node_modules/expo-camera expo-camera@"~16.0.17" from the root project peer react-native@"" from [email protected] node_modules/expo-constants expo-constants@"~17.0.7" from [email protected] expo-constants@"~17.0.7" from [email protected] node_modules/expo-asset expo-asset@"~11.0.4" from [email protected] expo-constants@"~17.0.5" from [email protected] node_modules/expo-linking expo-linking@"~7.0.5" from the root project peer react-native@"" from [email protected] node_modules/expo-file-system expo-file-system@"~18.0.11" from [email protected] peer react-native@"" from [email protected] node_modules/expo-image expo-image@"~2.0.6" from the root project peer react-native@"" from [email protected] node_modules/expo-linear-gradient expo-linear-gradient@"~14.0.2" from the root project peer react-native@"" from [email protected] node_modules/expo-linking expo-linking@"~7.0.5" from the root project peer react-native@"" from [email protected] node_modules/expo-status-bar expo-status-bar@"~2.0.1" from the root project peer react-native@"" from [email protected] node_modules/expo-web-browser expo-web-browser@"~14.0.2" from the root project peer react-native@"" from [email protected] node_modules/jest-expo dev jest-expo@"~52.0.4" from the root project peer react-native@">=0.38.0" from [email protected] node_modules/jest-react-native dev jest-react-native@"18.0.0" from the root project peer react-native@">=0.73.0" from [email protected] node_modules/react-native-is-edge-to-edge react-native-is-edge-to-edge@"^1.1.6" from [email protected] node_modules/react-native-keyboard-controller react-native-keyboard-controller@"^1.15.2" from the root project peer react-native@"" from [email protected] node_modules/react-native-keyboard-controller react-native-keyboard-controller@"^1.15.2" from the root project peer react-native@">= 0.64.3" from [email protected] node_modules/react-native-maps react-native-maps@"1.18.0" from the root project peer react-native@"" from [email protected] node_modules/react-native-pager-view react-native-pager-view@"6.5.1" from the root project peer react-native-pager-view@">= 4.0.0" from @react-navigation/[email protected] node_modules/@react-navigation/material-top-tabs @react-navigation/material-top-tabs@"^6.6.14" from the root project peer react-native-pager-view@"" from [email protected] node_modules/react-native-tab-view react-native-tab-view@"^3.5.2" from the root project peer react-native-tab-view@">= 3.0.0" from @react-navigation/[email protected] node_modules/@react-navigation/material-top-tabs @react-navigation/material-top-tabs@"^6.6.14" from the root project peer react-native@"" from [email protected] node_modules/react-native-ratings react-native-ratings@"^8.1.0" from @rneui/[email protected] node_modules/@rneui/base @rneui/base@"^4.0.0-rc.7" from the root project peer @rneui/base@"4.0.0-rc.7" from @rneui/[email protected] node_modules/@rneui/themed @rneui/themed@"^4.0.0-rc.8" from the root project peer react-native@"" from [email protected] node_modules/react-native-reanimated react-native-reanimated@"~3.16.1" from the root project peer react-native-reanimated@">=3.0.0" from [email protected] node_modules/react-native-keyboard-controller react-native-keyboard-controller@"^1.15.2" from the root project peer react-native@"" from [email protected] node_modules/react-native-safe-area-context react-native-safe-area-context@"4.12.0" from the root project peer react-native-safe-area-context@">= 3.0.0" from @react-navigation/[email protected] node_modules/@react-navigation/bottom-tabs @react-navigation/bottom-tabs@"^6.5.12" from the root project peer react-native-safe-area-context@">= 3.0.0" from @react-navigation/[email protected] node_modules/@react-navigation/elements @react-navigation/elements@"^1.3.31" from @react-navigation/[email protected] node_modules/@react-navigation/bottom-tabs @react-navigation/bottom-tabs@"^6.5.12" from the root project @react-navigation/elements@"^1.3.31" from @react-navigation/[email protected] node_modules/@react-navigation/native-stack @react-navigation/native-stack@"^6.9.17" from the root project peer react-native-safe-area-context@">= 3.0.0" from @react-navigation/[email protected] node_modules/@react-navigation/native-stack @react-navigation/native-stack@"^6.9.17" from the root project peer react-native-safe-area-context@"^3.1.9 || ^4.0.0" from @rneui/[email protected] node_modules/@rneui/base @rneui/base@"^4.0.0-rc.7" from the root project peer @rneui/base@"4.0.0-rc.7" from @rneui/[email protected] node_modules/@rneui/themed @rneui/themed@"^4.0.0-rc.8" from the root project peer react-native@"" from [email protected] node_modules/react-native-screens react-native-screens@"~4.4.0" from the root project peer react-native-screens@">= 3.0.0" from @react-navigation/[email protected] node_modules/@react-navigation/bottom-tabs @react-navigation/bottom-tabs@"^6.5.12" from the root project peer react-native-screens@">= 3.0.0" from @react-navigation/[email protected] node_modules/@react-navigation/native-stack @react-navigation/native-stack@"^6.9.17" from the root project peer react-native@"" from [email protected] node_modules/react-native-size-matters react-native-size-matters@"^0.4.0" from @rneui/[email protected] node_modules/@rneui/base @rneui/base@"^4.0.0-rc.7" from the root project peer @rneui/base@"4.0.0-rc.7" from @rneui/[email protected] node_modules/@rneui/themed @rneui/themed@"^4.0.0-rc.8" from the root project peer react-native@"" from [email protected] node_modules/react-native-svg react-native-svg@"15.8.0" from the root project peer react-native@"" from [email protected] node_modules/react-native-tab-view react-native-tab-view@"^3.5.2" from the root project peer react-native-tab-view@">= 3.0.0" from @react-navigation/[email protected] node_modules/@react-navigation/material-top-tabs @react-navigation/material-top-tabs@"^6.6.14" from the root project peer react-native@"" from [email protected] node_modules/react-native-webview react-native-webview@"13.12.5" from the root project peerOptional react-native-webview@"" from [email protected] node_modules/expo expo@"^52.0.37" from the root project peerOptional expo@">=50.0.0" from @react-native-community/[email protected] node_modules/@react-native-community/datetimepicker @react-native-community/datetimepicker@"8.2.0" from the root project peer expo@"" from [email protected] node_modules/expo-asset expo-asset@"~11.0.4" from [email protected] peer expo@"" from [email protected] node_modules/expo-camera expo-camera@"~16.0.17" from the root project peer expo@"" from [email protected] node_modules/expo-constants expo-constants@"~17.0.7" from [email protected] expo-constants@"~17.0.7" from [email protected] node_modules/expo-asset expo-asset@"~11.0.4" from [email protected] expo-constants@"~17.0.5" from [email protected] node_modules/expo-linking expo-linking@"~7.0.5" from the root project peer expo@"" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-dev-launcher expo-dev-launcher@"5.0.29" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-dev-menu expo-dev-menu@"6.0.19" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project expo-dev-menu@"6.0.19" from [email protected] node_modules/expo-dev-launcher expo-dev-launcher@"5.0.29" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-dev-menu-interface expo-dev-menu-interface@"1.9.3" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project expo-dev-menu-interface@"1.9.3" from [email protected] node_modules/expo-dev-menu expo-dev-menu@"6.0.19" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project expo-dev-menu@"6.0.19" from [email protected] node_modules/expo-dev-launcher expo-dev-launcher@"5.0.29" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-document-picker expo-document-picker@"~13.0.3" from the root project peer expo@"" from [email protected] node_modules/expo-file-system expo-file-system@"~18.0.11" from [email protected] peer expo@"" from [email protected] node_modules/expo-font expo-font@"~13.0.4" from the root project expo-font@"~13.0.4" from [email protected] peer expo@"" from [email protected] node_modules/expo-image expo-image@"~2.0.6" from the root project peer expo@"" from [email protected] node_modules/expo-image-loader expo-image-loader@"~5.0.0" from [email protected] node_modules/expo-image-picker expo-image-picker@"~16.0.6" from the root project peer expo@"" from [email protected] node_modules/expo-image-picker expo-image-picker@"~16.0.6" from the root project peer expo@"" from [email protected] node_modules/expo-keep-awake expo-keep-awake@"~14.0.3" from [email protected] peer expo@"" from [email protected] node_modules/expo-linear-gradient expo-linear-gradient@"~14.0.2" from the root project peer expo@"" from [email protected] node_modules/expo-location expo-location@"~18.0.7" from the root project peer expo@"" from [email protected] node_modules/expo-manifests expo-manifests@"~0.15.5" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project expo-manifests@"~0.15.5" from [email protected] node_modules/expo-dev-launcher expo-dev-launcher@"5.0.29" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-splash-screen expo-splash-screen@"~0.29.22" from the root project peer expo@"" from [email protected] node_modules/expo-updates-interface expo-updates-interface@"~1.0.0" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-web-browser expo-web-browser@"~14.0.2" from the root project peer expo@"" from [email protected] node_modules/jest-expo dev jest-expo@"~52.0.4" from the root project peer react-native@">= 0.30.0" from [email protected] node_modules/recyclerlistview recyclerlistview@"4.2.1" from @shopify/[email protected] node_modules/@shopify/flash-list @shopify/flash-list@"1.7.3" from the root project
@react-native/[email protected] node_modules/babel-preset-expo/node_modules/@react-native/babel-preset @react-native/babel-preset@"0.76.7" from [email protected] node_modules/babel-preset-expo dev babel-preset-expo@"~12.0.0" from the root project babel-preset-expo@"~12.0.9" from [email protected] node_modules/expo expo@"^52.0.37" from the root project peerOptional expo@">=50.0.0" from @react-native-community/[email protected] node_modules/@react-native-community/datetimepicker @react-native-community/datetimepicker@"8.2.0" from the root project peer expo@"" from [email protected] node_modules/expo-asset expo-asset@"~11.0.4" from [email protected] peer expo@"" from [email protected] node_modules/expo-camera expo-camera@"~16.0.17" from the root project peer expo@"" from [email protected] node_modules/expo-constants expo-constants@"~17.0.7" from [email protected] expo-constants@"~17.0.7" from [email protected] node_modules/expo-asset expo-asset@"~11.0.4" from [email protected] expo-constants@"~17.0.5" from [email protected] node_modules/expo-linking expo-linking@"~7.0.5" from the root project peer expo@"" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-dev-launcher expo-dev-launcher@"5.0.29" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-dev-menu expo-dev-menu@"6.0.19" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project expo-dev-menu@"6.0.19" from [email protected] node_modules/expo-dev-launcher expo-dev-launcher@"5.0.29" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-dev-menu-interface expo-dev-menu-interface@"1.9.3" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project expo-dev-menu-interface@"1.9.3" from [email protected] node_modules/expo-dev-menu expo-dev-menu@"6.0.19" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project expo-dev-menu@"6.0.19" from [email protected] node_modules/expo-dev-launcher expo-dev-launcher@"5.0.29" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-document-picker expo-document-picker@"~13.0.3" from the root project peer expo@"" from [email protected] node_modules/expo-file-system expo-file-system@"~18.0.11" from [email protected] peer expo@"" from [email protected] node_modules/expo-font expo-font@"~13.0.4" from the root project expo-font@"~13.0.4" from [email protected] peer expo@"" from [email protected] node_modules/expo-image expo-image@"~2.0.6" from the root project peer expo@"" from [email protected] node_modules/expo-image-loader expo-image-loader@"~5.0.0" from [email protected] node_modules/expo-image-picker expo-image-picker@"~16.0.6" from the root project peer expo@"" from [email protected] node_modules/expo-image-picker expo-image-picker@"~16.0.6" from the root project peer expo@"" from [email protected] node_modules/expo-keep-awake expo-keep-awake@"~14.0.3" from [email protected] peer expo@"" from [email protected] node_modules/expo-linear-gradient expo-linear-gradient@"~14.0.2" from the root project peer expo@"" from [email protected] node_modules/expo-location expo-location@"~18.0.7" from the root project peer expo@"" from [email protected] node_modules/expo-manifests expo-manifests@"~0.15.5" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project expo-manifests@"~0.15.5" from [email protected] node_modules/expo-dev-launcher expo-dev-launcher@"5.0.29" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-splash-screen expo-splash-screen@"~0.29.22" from the root project peer expo@"" from [email protected] node_modules/expo-updates-interface expo-updates-interface@"~1.0.0" from [email protected] node_modules/expo-dev-client expo-dev-client@"~5.0.12" from the root project peer expo@"" from [email protected] node_modules/expo-web-browser expo-web-browser@"~14.0.2" from the root project peer expo@"*" from [email protected] node_modules/jest-expo dev jest-expo@"~52.0.4" from the root project
the same error SyntaxError in node_modules/react-native/src/private/animated/NativeAnimatedHelper.js: '}'
@robhogan
any solution to this problem i cant upgrade from sdk 51 to sdk 52 expo
I had the same issue, upgrading react native to 0.77 and reanimated to the latest version (3.17.0) fixed it for me. Expo gudie to upgrade from 0.76 to 0.77 in expo 52: https://expo.dev/changelog/2025-01-21-react-native-0.77
I can say that this worked for me. This is what I had to do: npx expo install expo@latest npx expo install --fix Then I followed the expo steps to update React Native 0.77: npx expo install react-native@~0.77.1 react-native-reanimated@~3.16.7 react-native-gesture-handler@~2.22.0 react-native-screens@~4.8.0 react-native-safe-area-context@~5.1.0 react-native-webview@~13.13.1 After this, I had a build error because I'm using React Native Elements and it doesn't support safe-area-context 5, so I had to remove that library: npm uninstall @rneui/themed @rneui/base Then it built correctly, but when I tried to run the app, I got this error: Copy/react-native/Libraries/Components/ActivityIndicator/ActivityIndicator.js: Missing initializer in const declaration. (156:41)
154 | */ 155 |
156 | const ActivityIndicatorWithRef: component(
I solved it by installing this:
npm install --save-dev @babel/core@^7.25.2 @babel/preset-env@^7.25.3 @babel/runtime@^7.25.0 @react-native-community/[email protected] @react-native-community/[email protected] @react-native-community/[email protected] @react-native/[email protected] @react-native/[email protected] @react-native/[email protected] @react-native/[email protected]