The original version of this Article contained an error in the last sentence of the first paragraph of the Introduction and incorrectly read 'A proper electron beam control is one of the main challenges towards the Graal of developing a compact alternative of X-ray free-electron lasers by coupling LWFA gigaelectron-volts per centimetre acceleration gradient with undulators in the amplification regime in equation 11, nx(n-β) x β: n the two times and beta the two times should be bold since they are vectorsin Eq. 12, β should be bold as well.' The correct version is 'A proper electron beam control is one of the main challenges towards the Graal of developing a compact alternative of X-ray free-electron lasers by coupling LWFA gigaelectron-volts per centimetre acceleration gradient with undulators in the amplification regime.'This has been corrected in both the PDF and HTML versions of the Article.