Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IOS build warning: the transform cache was reset

I am getting this build warning from my React Native project in Xcode

warning: the transform cache was reset.

Hope someone can help me get rid of it!

Thanks in advance.

like image 495
LYu Avatar asked Sep 27 '17 16:09

LYu


2 Answers

I was getting a similar warning when running the react native bundling script located at node_modules/react-native/scripts/react-native-xcode.sh. I had to remove this line

--reset-cache \ 

to get rid of the error.

like image 167
jarora Avatar answered Sep 18 '22 11:09

jarora


Well I'm late to this party but might as well contribute with what happened to me. I've been having this issue for the last few days and the message the transform cache was reset was not the actual problem. It is a warning after all. The real issue in my case was that node was running out of memory. There is one quick way to patch it but chances is you'll have to trim down on packages.

For the patch go on Build Phases > Bundle React Native code and images

Change

export NODE_BINARY=node
../node_modules/react-native/scripts/react-native-xcode.sh

To

export NODE_BINARY=node
export NODE_OPTIONS="--max_old_space_size=4096"
../node_modules/react-native/scripts/react-native-xcode.sh

Again, this is just a patch, so chances is if you're having this problem there's a reason why node is running out of memory.

like image 37
David Conde Avatar answered Sep 19 '22 11:09

David Conde