Getting an error while installing Mojave 10.14.5

I am using an XPS 15 9570 (8750H, 1050ti, 1080p, 16 GB) and while installing macOS (black screen with an apple logo and the white bar) it will hang on "estimating time remaining..." for a few minutes, after which I get an error saying

macOS could not be installed on your computer The operation couldn't be completed (com.apple.StorageKit error 118.) Quit the installer to restart your computer and try again. 
submitted by /u/PMMEURTHROWAWAYS
[link] [comments]