React-native: [feature request] Add purge cache option to "react-native bundle" command

Created on 16 Dec 2015  路  6Comments  路  Source: facebook/react-native

Hi,

It cost me over an hour to figure out why my pre-bundle js not get updated after some code changes, it's because "react-native bundle" command is using caches. I find where the cache is by using the "--verbose" option.

The command line help doesn't provide any option relates to the cache used, it will confuse people who meet the same issue.

Locked

Most helpful comment

While there is no command to ONLY clear the cache, nor an argument for the bundle command, the packager now can clear cache at startup.

react-native start --reset-cache

It would be a great PR to separate this functionality into a separate command!

Closing this issue as we're trying to clean up issues and focus only on bugs. Thanks for bringing it up!

All 6 comments

Hey skatou, 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.

  • If you don't know how to do something or not sure whether some behavior is expected or a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
  • If this is a feature request or a bug that you would like to be fixed, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
  • We welcome clear issues and PRs that are ready for in-depth discussion. Please provide screenshots where appropriate and always mention the version of React Native you're using. Thank you for your contributions!

+1

cd /var/folder && sudo find -name react-packager* -exec rm -fr {} \;

@skatou Thanks, for reporting good to see I'm not alone with this issue.
I also wasted few hours on it until found this thread.

@fov42550564 thanks, deleting the cache worked for me.

Any plans for permanent solution?

+1

While there is no command to ONLY clear the cache, nor an argument for the bundle command, the packager now can clear cache at startup.

react-native start --reset-cache

It would be a great PR to separate this functionality into a separate command!

Closing this issue as we're trying to clean up issues and focus only on bugs. Thanks for bringing it up!

Was this page helpful?
0 / 5 - 0 ratings