i meet the same issue these days. i am pakcaging on switch platform and meet some shader compiled failed errors when cook.
finially i sloved this problem.
wise helpful for someone.
first i meet this Failed to compile default material /Engine/EngineMaterials/Default PostProcessMaterial.Default PostProcessMaterial!
then i set use with skeleton off in material, than ok. Default decal material has the same problem.
last i meet Failed to compile default material /Engine/EngineMaterials/WorldGridMaterial.WorldGridMateriall!
i try to copy this material,and than found that this material’s copy has no problem, i think maybe there are something wrong with this material.
so i open BaseEngine.ini and than change the default grid material path(many places) to the copy which has no problem, finally i successfully packaged the game.
maybe changing render api will be helpful too.