React-native: rn update from 0.44 to 0.49 error: Unable to resolve module 'uuid' from ..

Created on 26 Oct 2017  Â·  12Comments  Â·  Source: facebook/react-native

Is this a bug report?

YES
(write your answer here)
When I upgrade rn from 0.44.0 to 0.49.3. got error:Unable to resolve module 'uuid' from '..node_modules/react-native/Libraries/Blob/Blob.js':Mudule does not exist in the module map

Have you read the Contributing Guidelines?

(Write your answer here.)

Environment

Environment:
OS: macOS Sierra 10.12.6
Node: 8.5.0
Yarn: Not Found
npm: 4.2.0
Watchman: 4.7.0
Xcode: Xcode 9.0 Build version 9A235
Android Studio: 2.3 AI-162.4069837

Packages: (wanted => installed)
react: 16.0.0-alpha.6 => 16.0.0-alpha.6
react-native: 0.49.3 => 0.49.3

Steps to Reproduce

(Write your steps here:)

1.Xcode run

  1. Simulator show the error
    3.

Expected Behavior

(Write what you thought would happen.)
Can run correctly.

Actual Behavior

(Write what happened. Add screenshots!)

Reproducible Demo

(Paste the link to an example project and exact instructions to reproduce the issue.)

Ran Commands Stale

Most helpful comment

I am having the same issue and none of the options work
Unable to resolve module uuid from /Users/pranav.dixit/react_navtive_projects/AppUpdate/node_modules/react-native/Libraries/Blob/Blob.js: Module does not exist in the module map

This might be related to https://github.com/facebook/react-native/issues/4968
To resolve try the following:

  1. Clear watchman watches: watchman watch-del-all.
  2. Delete the node_modules folder: rm -rf node_modules && npm install.
  3. Reset Metro Bundler cache: rm -rf $TMPDIR/react-* or npm start -- --reset-cache. 4. Remove haste cache: rm -rf $TMPDIR/haste-map-react-native-packager-*.

All 12 comments

Hi @cq920702! Did you try to re-install node_modules?

Hi @cq920702 , I recently went through a similar experience upgrading from 0.44 to 0.49. I strongly recommend following this articles advice. I had a similar issue and it was due to a change in 0.48 where the RCTBlob.xcodeproj couldn't auto merge correctly. The solution was to go inside xcode and add the project to the file manually.

I hope this helps you out, let me know if you have any questions.

Hi! I am experiencing the same issue.
When I run npm install, uuid dependency is not found.
Using yarn instead of npm is solving this issue.
My assumption is that yarn places uuid as a shared dependency at the top of the dependency tree and npm does not do it. If uuid module is used in the blob library, it should b explicitly added to React dependencies.

Environment:
OS: macOS Sierra 10.12.6
Node: 8.7.0
Yarn: 1.2.1
npm: 5.5.1
Watchman: 4.9.0
Xcode: Xcode 9.0.1 Build version 9A1004
Android Studio: 2.3 AI-162.4069837

Packages: (wanted => installed)
react: 16.0.0-alpha.12 => 16.0.0-alpha.12
react-native: 0.48.4 => 0.48.4

Steps to Reproduce

  1. run npm install
  2. react-native run-ios

Facing the same issue.

Ubuntu
Android
React Native : 0.50.1
React : 16.0.0

Issue only on giving 'npm install' on 'yarn install' no issues.

Can confirm that this happens only when using npm install, yarn lifts the uuid dependency to the root in node_modules.

I believe this is a bug, in that react-native should have an explicit dependency on uuid, not depending on yarn or npm to hoist a transitive-dependency to the toplevel.

What's confusing to me, is that this problem has supposedly existed since 0.48 if I'm looking at the changelog correctly, and so I'm confused why it hasn't been reported/fixed before.

Anyone want to make the change? If not, I'll try to remember to add the dependency after I finish my RN upgrade and get my codebase working again.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.

Yes Mr Stale, this is still an issue.

RN still requires uuid:
https://github.com/facebook/react-native/blob/master/Libraries/Blob/Blob.js#L19

But uuid is not listed as a dependency:
https://github.com/facebook/react-native/blob/master/package.json

I am having the same issue and none of the options work
Unable to resolve module uuid from /Users/pranav.dixit/react_navtive_projects/AppUpdate/node_modules/react-native/Libraries/Blob/Blob.js: Module does not exist in the module map

This might be related to https://github.com/facebook/react-native/issues/4968
To resolve try the following:

  1. Clear watchman watches: watchman watch-del-all.
  2. Delete the node_modules folder: rm -rf node_modules && npm install.
  3. Reset Metro Bundler cache: rm -rf $TMPDIR/react-* or npm start -- --reset-cache. 4. Remove haste cache: rm -rf $TMPDIR/haste-map-react-native-packager-*.

I tried everything stated here and it didn't work. But then I updated my npm to 5.3.0 and that fixed the problem for me.

Thanks for posting this! It looks like you may not be using the latest version of React Native, v0.53.0, released on January 2018. Can you make sure this issue can still be reproduced in the latest version?

I am going to close this, but please feel free to open a new issue if you are able to confirm that this is still a problem in v0.53.0 or newer.

How to Contribute • What to Expect from Maintainers

Hopefully if anyone has come from Google and is still having an issue with this then I can help.
I'm running v0.53.0 of React Native and still had the error. It turned out that along the way somehow in managing my packages I had installed node-uuid which is a deprecated package.

This was the fix for me:
npm uninstall --save node-uuid && npm install --save uuid

Was this page helpful?
0 / 5 - 0 ratings