error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 142
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
error: command failed to execute correctly
Update: I looked at line 142 of all the files in the suggested folders but I couldn’t see anything wrong. I have no experience with this type of stuff, so I was looking for incorrect brackets to be fair. I also searched online for possible solutions but it seems like this problem is resolved differently in every case. Looking at /boot/grub/grub.cfg also didn’t reveal anything, but it is mostly incomprehensible to me.
pacman -Qo /etc/grub.d/*
/etc/grub.d/00_header is owned by grub 2:2.12rc1-1
/etc/grub.d/10_linux is owned by grub 2:2.12rc1-1
/etc/grub.d/20_linux_xen is owned by grub 2:2.12rc1-1
/etc/grub.d/25_bli is owned by grub 2:2.12rc1-1
/etc/grub.d/30_os-prober is owned by grub 2:2.12rc1-1
/etc/grub.d/30_uefi-firmware is owned by grub 2:2.12rc1-1
/etc/grub.d/35_fwupd is owned by fwupd 1.9.5-2
/etc/grub.d/40_custom is owned by grub 2:2.12rc1-1
/etc/grub.d/41_custom is owned by grub 2:2.12rc1-1
/etc/grub.d/41_snapshots-btrfs is owned by grub-btrfs 4.13-1
error: No package owns /etc/grub.d/45_eos_windows
/etc/grub.d/README is owned by grub 2:2.12rc1-1