Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rn update from 0.44 to 0.49 error: Unable to resolve module 'uuid' from .. #16543

Closed
cq0702 opened this issue Oct 26, 2017 · 12 comments
Closed
Labels
Ran Commands One of our bots successfully processed a command. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@cq0702
Copy link

cq0702 commented Oct 26, 2017

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
2. 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.)

@Kureev
Copy link
Contributor

Kureev commented Oct 28, 2017

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

@joefazz
Copy link

joefazz commented Oct 30, 2017

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.

@KaterGor
Copy link

KaterGor commented Nov 7, 2017

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

@rimzici
Copy link

rimzici commented Nov 15, 2017

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.

@JesperLekland
Copy link

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

@mikelambert
Copy link
Contributor

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.

@stale
Copy link

stale bot commented Jan 15, 2018

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.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 15, 2018
@mikelambert
Copy link
Contributor

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

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Jan 17, 2018
@pranavdixit
Copy link

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 #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-*.

@claireyoung
Copy link

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.

@react-native-bot
Copy link
Collaborator

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 ContributeWhat to Expect from Maintainers

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. Stale There has been a lack of activity on this issue and it may be closed soon. labels Feb 24, 2018
@dotCLL
Copy link

dotCLL commented Mar 20, 2018

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

@facebook facebook locked and limited conversation to collaborators May 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

Successfully merging a pull request may close this issue.