react-native: Error: Unable to resolve module `./debugger-ui/debuggerWorker.aca173c4.js` from ``:

Please provide all the information requested. Issues that do not follow this format are likely to stall.

Description

I am trying to add a babel plugin for react native project generated from react native starter. The babel plugin works fine on react project (generated from cra) and also on electron app using react . But it doesn’t work as expected on react-native one. The required manipulated(from babel-plugin) code , I can see in sources panel in browser debugger. but due to following error, the app doesnot run.

Error: Unable to resolve module ./debugger-ui/debuggerWorker.aca173c4.js from ``:

The moment I remove the comment which causes the babel plugin to manipulate the code. everything works fine.

Here is the repo, which reproduces the issue. https://github.com/simbathesailor/react-native-babel-plugin-example

Link to babel plugin which i want to add : https://github.com/simbathesailor/babel-plugin-use-what-changed

Screenshot 2020-12-07 at 2 34 12 PM

I have tried following links without resolution. https://github.com/facebook/react-native/issues/28844

React Native version:

Run react-native info in your terminal and copy the results here.

System: OS: macOS 10.15.7 CPU: (12) x64 Intel® Core™ i7-9750H CPU @ 2.60GHz Memory: 186.49 MB / 16.00 GB Shell: 5.7.1 - /bin/zsh Binaries: Node: 12.10.0 - ~/.nvm/versions/node/v12.10.0/bin/node Yarn: 1.17.3 - ~/.nvm/versions/node/v12.10.0/bin/yarn npm: 6.10.3 - ~/.nvm/versions/node/v12.10.0/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.10.0 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 14.1, DriverKit 19.0, macOS 10.15, tvOS 14.0, watchOS 7.0 Android SDK: Not Found IDEs: Android Studio: 4.1 AI-201.8743.12.41.6953283 Xcode: 12.1/12A7403 - /usr/bin/xcodebuild Languages: Java: 13.0.1 - /usr/bin/javac Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.3 => 0.63.3 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Steps To Reproduce

  1. Clone the repository https://github.com/simbathesailor/react-native-babel-plugin-example

  2. Run

yarn
npx react-native start --reset-cache
npx react-native run-ios     

You can run even for android, using:

npx react-native run-android.

it fails for it also.

Expected Results

The app should render properly without errors

Snack, code example, screenshot, or link to a repository:

https://github.com/simbathesailor/react-native-babel-plugin-example

https://github.com/simbathesailor/babel-plugin-use-what-changed

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 14
  • Comments: 21

Most upvoted comments

I have the same issue

duplicate #28844

@efstathiosntonas :I already tried the steps mentioned in #28844. I have mentioned in the issue description. So this does not look the exact duplicate of that issue. Thanks

using react native version -> react-native: 0.65.1 I am facing the similar issue. Error: Unable to resolve module ./debugger-ui/debuggerWorker.aca173c4