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.

Cannot find module './bundle/unbundle' after react-native-git-upgrade.

See original GitHub issue

Environment

System: OS: macOS 10.14.2 CPU: (4) x64 Intel® Core™ i7-4578U CPU @ 3.00GHz Memory: 448.52 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 11.6.0 - ~/.nvm/versions/node/v11.6.0/bin/node npm: 6.7.0 - ~/.nvm/versions/node/v11.6.0/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1 Android SDK: API Levels: 26, 27, 28 Build Tools: 27.0.3, 28.0.3 System Images: android-24 | Google APIs Intel x86 Atom, android-26 | Google Play Intel x86 Atom IDEs: Android Studio: 3.3 AI-182.5107.16.33.5199772 Xcode: 10.1/10B61 - /usr/bin/xcodebuild npmPackages: react: 16.6.3 => 16.6.3 react-native: 0.57.8 => 0.57.8 npmGlobalPackages: react-native-git-upgrade: 0.2.7

Description step 1. Create a new project with RN version 0.57.8. step 2. rename .babelrc to other name (.abelrc) step 3. react-native-git-upgrade step 4. react-native run-ios

then terminal print the message:

internal/modules/cjs/loader.js:605
    throw err;
    ^

Error: Cannot find module './bundle/unbundle'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
    at Function.Module._load (internal/modules/cjs/loader.js:529:25)
    at Module.require (internal/modules/cjs/loader.js:657:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/Users/morton.hsu/ReactNativeProject/testup/node_modules/react-native/local-cli/commands.js:44:1)
    at Module._compile (internal/modules/cjs/loader.js:721:30)
    at Module._compile (/Users/morton.hsu/ReactNativeProject/testup/node_modules/pirates/lib/index.js:83:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:732:10)
    at Object.newLoader (/Users/morton.hsu/ReactNativeProject/testup/node_modules/pirates/lib/index.js:88:7)
    at Module.load (internal/modules/cjs/loader.js:620:32)
mortonde-Mini:testup morton.hsu$ react-native info
internal/modules/cjs/loader.js:605
    throw err;
    ^

Error: Cannot find module './bundle/unbundle'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:603:15)
    at Function.Module._load (internal/modules/cjs/loader.js:529:25)
    at Module.require (internal/modules/cjs/loader.js:657:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/Users/morton.hsu/ReactNativeProject/testup/node_modules/react-native/local-cli/commands.js:44:1)
    at Module._compile (internal/modules/cjs/loader.js:721:30)
    at Module._compile (/Users/morton.hsu/ReactNativeProject/testup/node_modules/pirates/lib/index.js:83:24)
    at Module._extensions..js (internal/modules/cjs/loader.js:732:10)
    at Object.newLoader (/Users/morton.hsu/ReactNativeProject/testup/node_modules/pirates/lib/index.js:88:7)
    at Module.load (internal/modules/cjs/loader.js:620:32)

If I just create a new project with 0.58.3 or 0.57.8 is working.

But use react-native-git-upgrade from 0.57.8 to 0.58.3 and run the project get the error.

Any idea ? Thanks in advance.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:12

github_iconTop GitHub Comments

9reactions
motogodcommented, Jan 30, 2019

@m4rcoperuano I have asked the same question on stack overflow, Akio give me a solution. https://stackoverflow.com/questions/54414518/react-native-git-upgrade-error-cannot-find-module-accessibilityinfo

I’m not try the solution yet. I think you can try it.

If it is working or not, let me know it. Thanks.

6reactions
m4rcoperuanocommented, Jan 30, 2019

@motogod So i didn’t try what he mentioned, but it gave me a good hint! I never want to mess with anything labeled cache, so I ended up removing my node_modules folder. Recreating it, empty, and running npm install to rebuild all my modules. Thats it. My react-native commands started working again. I guess during my react-native-git-upgrade, my node_modules got out of sync? I’m not sure… but this worked for me without having to touch any cached files 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-native-git-upgrade Error: Cannot find module ...
I had same issue yesterday. I fixed it manually. from below files. \node_modules\.cache\@babel\register\.babel.7.2.2.development.json ...
Read more >
[Solved]-react-native-git-upgrade Error: Cannot find module ...
Coding example for the question react-native-git-upgrade Error: Cannot find module 'AccessibilityInfo'-React Native.
Read more >
RAM Bundles and Inline Requires - React Native
If you have a large app you may want to consider the Random Access Modules (RAM) bundle format, and using inline requires.
Read more >
Upgrading a React Native app with rn-diff-purge
Step 1 of this upgrade process is to identify your current version of the react-native module that is included in your project's package.json...
Read more >
git-bundle Documentation - Git
git bundle unbundle [--progress] <file> [<refname>…​] ... Then, git bundle prints a list of missing commits, if any. Finally, information about additional ...
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