Snippets

Short notes for future reference.

1 min read
#NEXT.JS#TAILWINDCSS

Next.js tailwindcss styles are lost in production mode

Issue

When first building a Next.Js 11 application in production mode, all the styling related to tailwindcss was lost.

Solution

The purge property in my tailwind.config.js configuration file looked like this:

1
2
3
module.exports = {
  purge: [join(__dirname, 'pages/**/*.{js,ts,jsx,tsx}')],
};

The official tailwindcss documentation explicitly states the following on the purge array:

this list should include any files in your project that reference any of your styles by name.

I extracted plenty of components from my pages into the components folder and they should also be added to the purge array like this:

1
2
3
module.exports = {
  purge: [join(__dirname, 'pages/**/*.{js,ts,jsx,tsx}'), join(__dirname, 'components/**/*.{js,ts,jsx,tsx}')],
};

Source

1 min read
#MANJARO#LINUX#WINDOWS#GRUB

Tell Windows 10 to use Grub

Issue

After replacing my defective motherboard on a dual boot system, the BIOS of the new motherboard no longer displayed Grub but booted directly into Windows 10.

Solution

In Windows 10, configure the boot manager to show Grub instead of the default from Windows:

1
bcdedit /set {bootmgr} path \EFI\Manjaro\grubx64.efi

Source

https://forum.manjaro.org/t/drive-not-shown-as-bootable-by-motherboard-works-on-live-usb/53200/8

1 min read
#KODI#SQL

Kodi retrieve missing (unparseable) files

This simple SQL query might save you some time if you need to get a list of files that Kodi 14.0 (former XBMC) cannot parse during a library update. The resulting list can then be used to fix/add the metadata for these files as described on http://kodi.wiki/view/Incorrect_and_missing_videos.

1
2
3
4
5
6
SELECT *
FROM `files` f
         INNER JOIN `path` p ON f.idPath = p.idPath
WHERE f.dateAdded IS NULL
  AND p.strPath LIKE "nfs://%"  # value to be replaced by the protocol/path used
  AND LENGTH(f.strFileName) > 0

More information about Kodi’s database structure can be found on http://kodi.wiki/view/Databases.