I am getting this error while running my React Native (Expo) project on Android:
enter image description here
I am facing an Android bundling error in my React Native (Expo) project.

When running:

npx expo start

or building for Android, I get the following error:

Android Bundling failed 12ms index.js (1 module) Error: [BABEL]: Cannot find module 'react-native-worklets/plugin' Require stack: - node_modules/@babel/core/lib/config/files/plugins.js - ...

The app fails to bundle and this error appears repeatedly.


Environment

React Native: (your version)

Expo SDK: (your version)

Node.js: (your version)

npm / yarn: (your version)

OS: (Windows/macOS/Linux)


babel.config.js

module.exports = { presets: ['babel-preset-expo'], plugins: [ 'react-native-worklets/plugin' ], };

What I have tried

Deleted node_modules

Deleted package-lock.json

Reinstalled dependencies using npm install

Cleared Expo cache using:

npx expo start -c

Restarted Metro bundler

Restarted system

The issue still persists.

abhinav's user avatar

New contributor

abhinav is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

1

Just install react-native-worklets package using - npm i react-native-worklets , also make sure your reanimated package is installed and upto date.

Also in babel.config.js do this:

module.exports = { presets: [ ... // don't add it here :) ], plugins: [ ... 'react-native-worklets/plugin', // add in plugins section ], };

Also remove node_modules and package-lock.json completely and hit 'npm i' again if issue persists.

Abdul_Basit's user avatar

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.