I bought a domain, now what?
I recently bought a domain. Not for the first time, but this is my first purchase for personal use. Throughout my studies and other developer related work I have always had a lot of supporting infrastructure. Colleagues who have already set up deployment pipelines, where all I had to to was push something to a git repository. Not that this is an issue, but at the end of the day I sit with the feeling that my hand needs to be held if I want to do anything on the web by myself, or any other software project for that matter.
I intend for that to change. And where else to start, than buying a domain! But now what? This domain needs to lead somewhere, and what should I be hosting? Good writing skills are few and far between, mine being no exception to this rule. So why not host a blog?
Parking in an empty parking lot
My issue with modern cloud solutions probably has to be the vast amount of options available. I have minor experience with AWS, but it is still pretty intimidating. And their invoices are nothing short of terrifying. The first other option that comes to mind would maybe be Googleβs GCP, but their track record for abandoning their own projects is at this point just impressive. A friend of mine had recently been playing around with Cloudflare for hosting and here we are.
The process has been simultaneously panless and painful. Getting this domain to point at a cloudflare deployment was very simple. Simply get the domain-registrar (which in this case is Porkbun) to point at the Cloudflare name-servers. The deployment itself was a bit more tricky. At first glance it looked like it was going to be extremely simple. The Cloudflare dashboard has an easy-to-use interface and all I had to do was connect a page to a git repository, describe what kind of project it was (Astro) and then deploy. Or so I thought.
The deployment kept failing with the same non-descriptive error message:
β€ YN0070: Migrating from Yarn 1; automatically enabling the compatibility node-modules linker π
β€ YN0000: β Resolution step
β€ YN0032: β fsevents@npm:2.3.3: Implicit dependencies on node-gyp are discouraged
β€ YN0002: β @astrojs/mdx@npm:0.19.7 doesn't provide astro (p33450), requested by @astrojs/markdown-remark
β€ YN0000: β Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
β€ YN0000: β Completed in 5s 645ms
β€ YN0000: β Post-resolution validation
β€ YN0028: β The lockfile would have been modified by this install, which is explicitly forbidden.
β€ YN0000: β Completed
β€ YN0000: Failed with errors in 5s 687ms
Error: Exit with error code: 1
at ChildProcess.<anonymous> (/snapshot/dist/run-build.js)
at Object.onceWrapper (node:events:652:26)
at ChildProcess.emit (node:events:537:28)
at ChildProcess._handle.onexit (node:internal/child_process:291:12)
Failed: build command exited with code: 1
Failed: error occurred while running build command
At first I thought it was an issue with supporting MDX β€ YN0002: β @astrojs/mdx@npm:0.19.7 doesn't provide astro (p33450), requested by @astrojs/. But removing this from the project only removed it from the error logs, the error itself persisted. Most stack overflow threads mentioned that Cloudflare Pages was basically legacy, with very poor node support. But tweaking the versions didnβt change that much either.
What did the trick? Nuking yarn as the package manager.
Non-descriptive and deceptive error messages probably has to be the bane of my existence. There is nothing in this error log that screams STOP USING YARN. There also is nothing on their documentation that mentions not to use yarn either. I also feel like Iβm getting tricked when the logs explicitly state Migrating from Yarn 1; automatically enabling the compatibility node-modules linker π as if they have native support for yarn that automagically fixes everything for you.
But hey! Now the blog is live, under my custom domain.
Bless.
Published: