Canot enter TWRP recovery because of "fastboot erase userdata" I want to flash a new ROM for my Android phone.

I clean data by fastboot erase userdata

but after that, I can not enter TWRP recovery because can not mount /data

I tried fastboot format userdata

then below errors occured:

Couldn't parse erase-block-size '0x'.
Couldn't parse logical-block-size '0x'.


So how to make the TWRP work again?

Or how to rebuild the data partition by fastboot?
I had the same problem but from a different reason. I was trying to unlock the bootloader, and I think my phone erased all the existent data for protection. 

After I installed TWRP custom recovery, then my phone started booting, showing those errors every time TWRP appeared and restarting it again. 

In my case, I solved the problem selecting recovery mode, then formatting the partitions from TWRP wipe screen. I took me a while to realise that my phone was displaying TWRP, but the phone wasn't in recovery at that point.