Hi
I want to upgrade my React Native from 0.13.2 to 0.17, so as the instruction https://facebook.github.io/react-native/docs/upgrading.html#content
npm install --save [email protected] and then react-native upgrade
But when I run my project, the terminal say this:
Unable to resolve module requestAnimationFrame from /Users/xiong/Documents/meituan/frontend/bee/node_modules/react-native/Libraries/Animated/src/AnimatedImplementation.js
Unable to resolve module keyMirror from /Users/xiong/Documents/meituan/frontend/bee/node_modules/react-native/Libraries/Components/WebView/WebView.ios.js
Unable to resolve module ReactPropTypes from /Users/xiong/Documents/meituan/frontend/bee/node_modules/react-native/Libraries/Inspector/ElementProperties.js
Unable to resolve module ReactDefaultPerf from /Users/xiong/Documents/meituan/frontend/bee/node_modules/react-native/Libraries/Utilities/RCTRenderingPerf.js
Unable to resolve module ReactPropTypes from /Users/xiong/Documents/meituan/frontend/bee/node_modules/react-native/Libraries/CameraRoll/CameraRoll.js
...
...
...
Unable to resolve module ReactPropTypes from /Users/xiong/Documents/meituan/frontend/bee/node_modules/react-native/Libraries/LayoutAnimation/LayoutAnimation.js
Unable to resolve module keyMirror from /Users/xiong/Documents/meituan/frontend/bee/node_modules/react-native/Libraries/LayoutAnimation/LayoutAnimation.js
[00:46:03]
[00:46:03]
transforming [======== ] 21% 65/311Error: ENOENT: no such file or directory, open '/Users/xiong/Documents/meituan/frontend/bee/node_modules/react-native/packager/react-packager/src/DependencyResolver/polyfills/prelude_dev.js'
at Error (native)
transforming [======================================= ] 98% 304/311[10:17:56]
Error: ENOENT: no such file or directory, open '/Users/xiong/Documents/meituan/frontend/bee/node_modules/react-native/packager/react-packager/src/DependencyResolver/polyfills/prelude_dev.js'
at Error (native)
Hey shawnXiao, thanks for reporting this issue!
React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.
react-native or for more real time interactions, ask on Discord in the #react-native channel.Hi there! A good thing to try in this case is rm -rf node_modules and then run npm install again from scratch. If this doesn't work for you, try out StackOverflow or Discord as @facebook-github-bot so kindly mentioned above :)
It's a cache issue. See: https://github.com/facebook/react-native/issues/1924
You need to clear your packager cache: rm -fr $TMPDIR/react-*
Or this appears to do the trick also: watchman watch-del-all
Fixed again with:
โฏ rm -fr $TMPDIR/npm*
โฏ rm -fr $TMPDIR/*.json.gzip
If clearing the cache still doesn't work for you, do you have a project rn-cli.config.js defined?
Try without it. (Or make sure you base it on the node-modules/react-native/packager/rn-cli.config).
Tried all the things in this thread.
5335 rm -rf node_modules/
5336 npm install
5339 rm -fr $TMPDIR/react-*
5340 watchman watch-del-all
5341 rm -fr $TMPDIR/npm*
5342 rm -fr $TMPDIR/*.json.gzip
5343 cat rn-cli.config.js
(no file found)
Still getting the error: ENOENT: no such file or directory, uv_chdir
Follow up: the source code I checked out did not have an ios folder, causing the start up of the app to fail. I fixed that at the source and it started up fine after pulling new code.
Just a very cryptic error message in this case.
I have the same situation. My project only has a android folder, but no ios one. Is there a similar command to react-native android that creates a bare iOS project?
How can I create a new iOS project based on the android React Native project that I have?
@marktani I think the answer is "find whoever made the project and get them to add the ios folder into their repo". Barring that, init a new project and copy over the ios folder from it -- but you'll have to edit the files to get them to work with your project, things like the name of the project. Sounds like a hassle. You might be better off initing a new project and copying your work into it.
Right, thanks for the help! I got it working by doing init as you said.
I am the one who created the project in the first place, but I did so on a Linux machine. I think that's why there was no ios folder being created...
think that's why there was no ios folder being created
That doesn't sound right. I don't have a linux vm handy to test it on though... On second thought I suppose it could be right because XCode won't run on linux. Wow, how lame would that be? Only being able to develop ios apps on a mac, even when using a cross-platform tool like RN?
react-native upgrade ... took me a while to resolve it :/
@julesmoretti
react-native upgrade worked
thx!
react-native upgrade will init your project config !!!
Most helpful comment
react-native upgrade... took me a while to resolve it :/