Category: Fixes

The struggles are real, but the solutions are too. Read about the annoying problems I’ve faced and the (sometimes creative) fixes I’ve found to overcome them. Because who hasn’t wasted hours on a stupid bug?

  • Step by Step: How to Fix your server’s DNS Resolver within 5 minutes

    Step by Step: How to Fix your server’s DNS Resolver within 5 minutes

    Emails can be scary. Especially if they’re not coming from @gmail, @hotmail, or whatever, but from a damn government agency—and not just once. But the culprit is not you; it’s your DNS Resolver.

    tl;dr

    Start at Step 1.

    Luckily, I had done my homework when I chose my server and can now enjoy the tears in /r/hosting where people – despite a million warnings – open posts and beg for help to get out of GoDaddy’s contract. GoDaddy, and this must be said once and for all, is the absolutely shittiest, cheapest (I don’t mean the price), and most scammy hosting provider out there!

    E-Mail from Hell

    Alright, since this is clear now, let’s continue with the emails. So, every few weeks, I’d receive an email from Hetzner, immediately scaring the shit out of me.

    Sender: [email protected].
    Subject line: [AbuseID:112F9G4A:1B]: AbuseBSI: [CB-Report#20260218-10003814] Offene DNS-Resolver in AS249401

    Recipient: me 😬

    That doesn’t sound good, I remember thinking, not good at all. Hetzner is a German company. I am a German citizen. And I’ve been busted before for torrenting a shitty German movie I thought nobody, but my then-girlfriend, would care about anyway. Well, as it turned out, one of these law firms that always has one or two partners (“Wehler, Henkel & Secht” or something) did care, and their care had a price tag: €1,000 EUR, please. I paid the same day.

    Federal Office for Information Security

    I immediately thought of this rather forgotten day in my life and hastily skimmed the email. Hetzner’s scary [email protected] handle had only redirected an email they had received (I let my email client translate it into English, only for you!):

    Abuse email notification on a computer screen: DNS Resolver
    Hetzner’s “abuse” email

    The real reason for this was buried in the email history at the end. No translation here, because only the highlighted part meant something:

    Email warning message on computer screen
    Message from the federal office for information security

    So, the Federal Office for Information Security had been asking me for months, if not years, via the CERT Bund to close my open DNS resolver. No problem, if I only knew how. But that’s exactly where Cherry Studio, my desktop AI client, came into play. I have “assistants” for nearly everything, all carefully fed with system instructions to get the best out of each model.

    So it was only natural that I also had a “Server Guy,” whom I fed with all conceivable information about my dedicated server, the websites they host, its technology, and so on. My LLM of choice was GLM-4.7, which costs me nothing, so there’s that. Not even 5 minutes later, I was done.

    A’ight, let’s get our hands dirty and shut this DNS Resolver down!

    Step 1: Login

    Spin up the terminal of your choice and SSH into your server (you must be root, obviously). Here’s mine, for the curious ones:

    Step 2: Identify the Server

    To see what’s running, use one of the two commands:

    systemctl status named
    # OR
    systemctl status bind9
    Bash

    Right at the top of the output, you’ll see named.service, and behind that what’s actually running. In my case BIND Domain Name Server.

    Step 3: Check if it is an open DNS Resolver

    grep -A 10 "allow-recursion" /etc/named.conf
    Bash

    You’ll get some text, but look out for this:

    allow-recursion {
      any;
    };
    Bash

    You can already see what I flagged. It’s the “any” that the Federal Office for Information Security doesn’t like—an open DNS resolver. Because it can be hijacked for DDoS attacks.

    Step 4: Change DNS Resolver

    Open the file (nano /etc/named.conf) and switch the any to localhost, like this:

    allow-recursion {
    	127.0.0.1;
    	::1;
    };
    Bash

    Step 5: Last Steps

    1. Verify

    named-checkconf
    Bash

    No output? That’s how it should be.

    2. Reload BIND

    systemctl reload named
    Bash

    3. Verify it’s running

    systemctl status named
    Bash

    Save, exit, and be happy you’ll never get scary emails again. At least not from Hetzner.

    Checks (optional)

    But since we’re professionals and don’t get our servers at GoDaddy (or anything else for that matter!), we do a quick check.

    From your local machine, swap the the IP to your server’s IP, and run:

    dig @75.31.131.28 google.com # Change IP to your server's IP
    Bash

    This should give you some output with the words REFUSED on SERVFAIL. That means recursion is now blocked.

    Last check, this time on your server (No need to change anything here):

    dig @127.0.0.1 google.com
    Bash

    Here, however, recursion must work. If you see anything from the above, check for missing commas or semicolons in /etc/named.

    What do we learn from this story? How to close the DNS resolver, of course. And that not every email with “abuse” in its name is to be taken literally.

    1. Numbers changed for security reasons ↩︎

  • Fixing Nuxt Installation: “ERROR TTY initialization failed: uv_tty_init returned EINVAL (invalid argument)”

    Fixing Nuxt Installation: “ERROR TTY initialization failed: uv_tty_init returned EINVAL (invalid argument)”

    Should I? Or shouldn’t I? This is what I keep asking myself every time I pack my bags for a vacation, short or long. Do I really need my MacBook Air on Koh Samui? Maybe I’ll get into a situation where a simple iPhone is not enough. Watching a movie, for example. Or writing code.

    tl;dr

    Downgrade Node.js via nvm from 25.x.x to 24.x.x (LTS):

      # Download 24.11.1 (LTS) version
      nvm install --lts
      
      # Apply version
      nvm use --lts
      
      # Verify Node.js version; should show: v24.11.1
      node -v
      Bash

      Install the dependencies with yarn instead of bun:

        yarn
        Bash

        Coding under Coconut Trees

        I get it, totally. Sitting on a 28°C-degree tropical island, surrounded by pristine beaches and a forest of coconut trees so high that they almost kiss the sun, doesn’t seem to be the ideal location to open a code editor and look at what other hotel guests may interpret as hieroglyphs.

        It’s not only nerdy, but outright sad. “There,” says the toddler to his dad, “he’s playing computer,” pointing at me with his finger. And dad? He says nothing but slowly shakes his head and is—once again—reinforced in his belief that people, the “generation X,” aren’t capable of going anywhere without their digital opium.

        “Test Something”

        On one hand, he’s right. On the other hand, he’s not. Without drifting off the actual topic like a dinghy in the Gulf of Thailand, I can only say: I had a very good reason.

        However, that reason had nothing to do with the error I encountered today for the first time. Long story short, I needed to clone one of my Nuxt 4 projects and run the development server to—let’s keep it vague because it doesn’t matter—test something.

        The usual steps:

        1. git clone https://gitlab.com/.../project
        2. cd project
        3. bun i

        “ERROR TTY initialization failed”

        And that’s where it went awry. As a side note: Whenever possible, I use the package manager bun. It works for the vast majority of projects, and it’s blazingly fast, especially once packages have been cached.

        But this time, bun i stopped with an error that didn’t really tell me much:

        ERROR  TTY initialization failed: uv_tty_init returned EINVAL (invalid argument)
        Bash

        A quick Google search showed that I wasn’t the only one having this problem with the combination bun + Nuxt. The GitHub user corpix proposed a quick fix for this by setting export NUXT_TELEMETRY_DISABLED to 1. To me, however, this felt more like a hack than an actual solution, just like other fixes.

        Console showing ERROR TTY initialization failed: uv_tty_init returned EINVAL (invalid argument)
        The error message in all its glory.

        What’s uv_tty_init?

        So I kept digging. It turns out that uv_tt_init has something to do with Nuxt’s telemetry module (hence corpix’ fix). The module tries to prompt you (via TTY) to opt in/out of analytics during initialization. However, bun has a known bug handling TTY streams on certain platforms(especially Windows, but also in non-interactive terminals), causing this EINVAL error.​

        What made things a whole lot clearer was when I tried to install Nuxt via good, old yarn. Reliably, it reported the same error, but this time with some information that could be fixed easily:

        The engine "node" is incompatible with this module. Expected version ">=18.0.0 <=24.x". Got "25.2.1"
        error Found incompatible module.
        Bash

        On the Safe Side with LTS

        Seems like Node.js 25.x.x doesn’t get along with the telemetry module. Luckily, using the Node Version Manager, or nvm, downgrading to 24.x.x was a matter of seconds. It downloads the LTS version 24.11.1, and developers usually make sure that their code works with the latest LTS.

        If you’re not sure whether you have nvm, simply run nvm -v. If it’s installed, it should give you its version number. At the time of writing this, I received 0.40.3.

        If the command wasn’t found, it’s quickly installed by running brew install nvm (I’m assuming we’re all on macOS here and have Homebrew installed). Pay attention to the installation, because at the end, you’ll have to copy some lines and add them to your .zshrc. This is what you’ve got to add at the bottom of your .zshrc:

        # NVM (Node Version Manager)
        export NVM_DIR="$HOME/.nvm"
        # This loads nvm
        [ -s "/usr/local/opt/nvm/nvm.sh" ] && \. "/usr/local/opt/nvm/nvm.sh"  
        # This loads nvm bash_completion
        [ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/usr/local/opt/nvm/etc/bash_completion.d/nvm"
        Bash

        Done? Great. Then restart your terminal or session, and you should then have access to the nvm command. And now, we

        1. download the latest LTS version via nvm install --lts
        2. and tell our project to use it by running nvm use --lts

        At this time, --lts means v24.11.1. The output in your terminal or console should be:

        Now using node v24.11.1 (npm v11.6.2)

        And that’s already it. You can leave Nuxt’s telemetry working instead of just suppressing the error, and reinstall your packages with bun i or yarn (or whatever package manager you prefer).

        Once all is installed properly, run bun dev or yarn dev and see your beautiful Nuxt page starting up. Grab yourself a fresh coconut while you’re waiting and go to the beach to wash off the nastiness of Node.js error messages.

        Enjoy your vacation!

      1. Fixing WebStorm’s Copilot Plugin Error Message: “Sign in failed. Reason: Could not log in with device flow”

        Fixing WebStorm’s Copilot Plugin Error Message: “Sign in failed. Reason: Could not log in with device flow”

        I’m an avid user of GitHub’s Copilot, and since I never code in anything but JetBrains products, I’m using the GitHub Copilot plugin for WebStorm and all of my other IDEs. However, yesterday I had a weird error. As so often, it turned out, the error was: me.

        (more…)
      2. Nuxt v3.16 is out—and TailwindCSS doesn’t seem to like it and breaks styling after upgrade. Here’s how you can fix it

        Nuxt v3.16 is out—and TailwindCSS doesn’t seem to like it and breaks styling after upgrade. Here’s how you can fix it

        With big fanfare, Daniel Roe, the inventor and person in charge of Nuxt, proudly released the newest version of my favourite JavaScript framework on March 7, 2025: Nuxt v3.16. It promised better performance, better error handling, and a lot more. The full announcement blog post showed that all Nuxt contributors are proud of the new version. They also gave instructions on how to upgrade to v3.16 from previous versions—which immediately broke my Tailwind styling. However, thanks to the Nuxt community, I can now show you the easy fix to this problem.

        (more…)
      3. Enable or disable dark mode in Nuxt 3 with NuxtUI v2 and Tailwind with this easy plugin

        Enable or disable dark mode in Nuxt 3 with NuxtUI v2 and Tailwind with this easy plugin

        I love dark mode. With a few exceptions, all of the websites I visit, program, or use as apps on my iPhone have dark mode enabled. When it comes to Nuxt 3, my favorite front-end meta-framework, it can only be just a setting in the nuxt.conf.ts file.

        Or not?

        (more…)
      4. PHP module “imagick” failed to install with “error: not found. Please provide a path to MagickWand-config or Wand-config program.” Solve it in 2 minutes

        PHP module “imagick” failed to install with “error: not found. Please provide a path to MagickWand-config or Wand-config program.” Solve it in 2 minutes

        At around 04:30 in the early morning of Monday, January 12t, 2024, I had a spontaneous epiphany. It was clearer than ever that my iMac—already an old model bought in 2022 with only an M1 chip—needed to be wiped clean and its OS reinstalled. A total reset, barely two hours before sunrise.

        (more…)
      5. Reddit Double-Refreshing in Chrome and macOS? It’s AdGuard. Here’s the Fix

        Reddit Double-Refreshing in Chrome and macOS? It’s AdGuard. Here’s the Fix

        Okay, I admit, this one is probably a case that only applies to myself, but you never know. For a few weeks now, Reddit has been annoying me by reloading every page I am on—sometimes even twice. By tediously eliminating all extensions and plugins one by one, I eventually found the culprit—a simple checkbox in AdGuard’s settings security settings.

        (more…)
      6. Nuxt v3 Error: “ERROR [unhandledRejection] Nuxt instance is unavailable!”

        Nuxt v3 Error: “ERROR [unhandledRejection] Nuxt instance is unavailable!”

        Another day, another Nuxt project. Nuxt has just released v3.14.1592, which I chose because I wanted to have a look at the unannounced Nuxt v4, which uses TailwindCSS v4 and other packages with major changes.

        So I ran the usual single-line command line to install Nuxt from scratch and I’m ready to explore—or so I had thought.

        (more…)
      7. Quick fix for “ExperimentalWarning: CommonJS module using require()” error message in Node.js

        Quick fix for “ExperimentalWarning: CommonJS module using require()” error message in Node.js

        JavaScript frameworks and meta-frameworks such as Next.js or Nuxt.js are everywhere. Working with them locally is astonishingly easy; all you need is Node.js and a package manager.

        If you’re using the latest version of Node.js, chances are good that you’ve run into the same bug as I have, and it appeared whenever I launched the development server: “ExperimentalWarning: CommonJS module using require().” Here’s the reason why it pops up and two ways to fix it.

        (more…)
      8. Here’s how to fix “Fatal error: Cannot declare class” in PHP Composer

        Here’s how to fix “Fatal error: Cannot declare class” in PHP Composer

        I ran into a small problem while trying to install packages with PHP Composer. The error message didn’t help me. Here’s how you can fix it in under one minute.

        (more…)