question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Export namespace should be first transformed by `@babel/plugin-proposal-export-namespace-from`

See original GitHub issue

Description

After Adding React-native-reanimated getting this error error: node_modules/react-native-reanimated/src/index.ts: /Users/mgk_devops/Desktop/SafariTabsReactNative/SafariTabs/node_modules/react-native-reanimated/src/index.ts: Export namespace should be first transformed by @babel/plugin-proposal-export-namespace-from. 5 | export * from ‘./reanimated1’; 6 | export * from ‘./reanimated2’;

7 | export * as default from ‘./Animated’; | ^^^^^^^^^^^^ 8 |

Expected behavior

Actual behavior & steps to reproduce

npm i react-native-reanimated import Transitioning from “react-native-reanimated” nix react-native run-android

Package versions

name version
react-native 0.69.1
react-native-reanimated 2.9.1
NodeJS v16.14.2
Xcode 13.3
Java 11.0.11
Gradle 7.4.2

Affected platforms

  • Android
  • iOS
  • Web

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:19
  • Comments:55 (1 by maintainers)

github_iconTop GitHub Comments

47reactions
piaskowykcommented, Jul 5, 2022

Did you add Reanimated Babel plugin? more instructions here - https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation#babel-plugin

40reactions
michelorthcbacommented, Jul 12, 2022

this works for me

module.exports = { presets: [‘module:metro-react-native-babel-preset’], plugins: [ … ‘react-native-reanimated/plugin’, ], };

And

yarn start --reset-cache npm start – --reset-cache expo start -c

Read more comments on GitHub >

github_iconTop Results From Across the Web

Export namespace should be first transformed by `@babel ...
You have to add the 'react-native-reanimated/plugin' to the plugins array. make sure this Plugin should be the last.
Read more >
Export namespace should be first transformed by `@babel ...
error: node_modules/react-native-reanimated/src/index.ts: ...
Read more >
babel/plugin-proposal-export-namespace-from
Installation. npm install --save-dev @babel/plugin-proposal-export-namespace-from. Copy. Usage. With a configuration file (Recommended).
Read more >
@babel/plugin-proposal-export-namespace-from - npm
Compile export namespace to ES2015. ... Start using @babel/plugin-proposal-export-namespace-from in your project by running `npm i ...
Read more >
expo start | 스파르타 즉문즉답
... Export namespace should be first transformed by `@babel/plugin-proposal-export-namespace-from`. 5 | export * from './reanimated1'; 6 | export * from '.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found