Android и iOS. Проблема с createAnimatedComponent.tsx. Ожидается, что неожиданный токен на выставке реагирует на собствеAndroid

Форум для тех, кто программирует под Android
Ответить
Гость
 Android и iOS. Проблема с createAnimatedComponent.tsx. Ожидается, что неожиданный токен на выставке реагирует на собстве

Сообщение Гость »


I'm running an expo react-native application with dependent version
  • "expo": "^49.0.0"
  • system MAC M1 Venture 13.2.1 (22D68)
  • Node version is v20.11.1
  • npm version is 10.2.4
  • npx version is 10.2.4

Have configured all the packages and plugins correctly even ./gradlew clean command is getting successful. But while running the yarn android on run time on the emulator below issue arises for the react-native-reanimated for syntax error.

Find the issue as below,

error: SyntaxError: /Users/da/Desktop/Documents/apps/expoapps/mm/myapp/node_modules/react-native-reanimated/src/createAnimatedComponent/createAnimatedComponent.tsx: Unexpected token, expected "," (105:28) 103 | // @ts-ignore This is required to create this overload, since type of createAnimatedComponent is incorrect and doesn't include typeof FlatList 104 | export function createAnimatedComponent( 105 | component: typeof FlatList, | ^ 106 | options?: Options 107 | ): ComponentClass; 108 | ` Have the dependency version as,
  • "react-native": "0.72.10",
  • "react-native-reanimated": "^3.7.1",

and babel.config.js as followed as,

module.exports = function(api) { api.cache(true); return { presets: ['babel-preset-expo'], plugins: ['react-native-reanimated/plugin'], }; }; Also in the iOS platform, it fails with the react-native-reanimated package with same error, and also, below is the iOS runtime error caught on Simulator

iOS Bundling failed 12533ms error: SyntaxError: /Users/devendraahirwar/Desktop/Documents/apps/expoapps/mm/matrimoniallagnagathi/node_modules/react-native-reanimated/src/reanimated2/threads.ts: Unexpected token (235:47) 233 | 234 | return (...args) => 235 | runOnJS(runWorkletOnJS)( | ^ 236 | fun as WorkletFunction, 237 | ...args 238 | ); Any resolution on this?
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Android»