Software Development

Building this Website: Part 3

Or fixing the issues

1 August 2025

So, the website had been made, the first post was ready and displaying online. Now, all that was needed was for it to be deployed to the internet. This is where Vercel comes in. For those unaware, Vercel is a way to deploy static sites that are saved in a GitHub repository and it's incredibly easy to use. Simply create an account on Vercel, create a project and link it to the repository. If there's no issues, then it should deploy the website online.

When I was first uploading it, many issues did of course occur. For instance, since I was using typescript, errors would appear often around things not being defined, but this wouldn't prevent the website loading on the localhost. However, Vercel understandably did not allow for these errors so it all had to be resolved. I had to go through and create all the necessary types:

export type PostFrontmatter = {
    title: string
    date: string
    subtitle: string
    category: string
}

export type PostListing = PostFrontmatter & {
    slug: string
}

export type PostFull = PostListing & {
    content: string
}

The big issue that occurred and caused a constant stream stream of deployment errors was with next-mdx-remote.

Stream Of Errors

The stated error for all these failed deployments just stated TypeError: Cannot read properties of null (reading 'useState'). No matter my removal of all the 'useState' statements, no changes would occur. Eventually I found that my use of the next-mdx-remote package, a package used for the reading and displaying of markdown, was the problem. It was incompatible with the current version of Next.js. There was no sign of this being an issue during testing and building of the site and the whole site was built using package. I'd either have to downgrade the version of Next.js in use, or change the site completely.

There was another much more fortunate option though. There is a package called next-mdx-remote-client. It essentially dows all the same stuff as next-mdx-remote but with a few more features but also, and more importantly has been kept updated. Essentially all I had to do was install this package and update all the references.

And there it was, the website was done. But what are the plans for the future? Well there's some ideas. As it stands I'm quite happy to keep writing up posts, while working on my personal projects in the background. As can be seen on this website I do plan to showcase some of them pretty soon. I'm also hoping to talk about some of the books I've read, a lot of which are great self-improvement books. I'm enjoyign having this website so far and I look forward to where it will take me.