Notes on converting stripped down Nextjs landing/home page template to Astro template
The stripped down Nextjs landing/home page project/template is covered in a previous post.
Late evening, 14 February 2026
Now trying out: https://github.com/jonnysmillie/astro-base
npm install gave: 1 high severity vulnerability
npm audit fix: resolved it.
npm run dev: App is running and seems to be working as expected.
This whole process from cloning repo to running app was really simple and straightforward to do. It was quite fast too.
-------------------
In CoPilot chat with stripped down Nextjs landing/home page template opened in VSCode:
Me: Can you read the source files of this Next.js project and create an equivalent Astro project?
[It did the conversion, giving lot of messages, prompting me to accept new folder creation, file modification etc. which I accepted. I copy-pasted the session in stripdowncomm-astro-conv.docx in parent folder. ... I am pleasantly surprised. Is this agentic coding? Probably not.]
...
Me: Terrific! I will now open that project in VSCode. BTW what model are you using?
CoPilot [CP]: I'm using Claude Haiku 4.5.
Go ahead and open the Astro project in VS Code! It's all set up and ready to customize. Let me know if you need any help with development, configuration, or have questions about the conversion.
[I also chose 'keep' for 32 files changed message.]
=============
Opened stripdowncomm-astro folder.
Ran: npm install
stripdowncomm-astro> npm install
npm error code ETARGET
npm error notarget No matching version found for @astrojs/tailwind@^0.4.0.
npm error notarget In most cases you or one of your dependencies are requesting
npm error notarget a package version that doesn't exist.
npm error A complete log of this run can be found in: ---snipped---
stripdowncomm-astro>
------
CP said: The issue is that @astrojs/tailwind@^0.4.0 doesn't exist as a published version. Let me update it to a version that exists. For Astro 5.x, version 0.5.x should be compatible:
[The model is still Claude Haiku 4.5. I give it permission to make changes]
Created git repo.
git commit -m "Commit after Nextjs to Astro conversion by Claude Haiku 4.5 but with tailwind version change to 0.5.0"
npm install
npm error code ETARGET
npm error notarget No matching version found for @astrojs/tailwind@^0.5.0.
npm error notarget In most cases you or one of your dependencies are requesting
npm error notarget a package version that doesn't exist.
npm error A complete log of this run can be found in: ---snipped---
---------
Me: Why is astrojs/tailwind needed? Another astro project I saw, does not use it even though it uses tailwind
CP said it is optional
Me: I will delete it as once again npm install gave an error: npm error notarget No matching version found for @astrojs/tailwind@^0.5.0.
CP did the deletion.
----------
stripdowncomm-astro> npm install
added 345 packages, and audited 346 packages in 2m
154 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
stripdowncomm-astro>
---------
npm run dev
> stripdowncomm-astro@0.0.1 dev
> astro dev
12:15:34 am [vite] (ssr) Error when evaluating SSR module ---snipped---\stripdowncomm-astro\astro.config.mjs: Cannot find module '@astrojs/tailwind' imported from '---snipped---/stripdowncomm-astro/astro.config.mjs'
CP: Done. I've removed the @astrojs/tailwind import and the tailwind() integration from astro.config.mjs. Try npm run dev again.
----------
Now npm run dev showed some page but with this error:
ReferenceError
An error occurred.
RootLayout is not defined
===============
I guess now I have to dig in and check the source code. Just to check out, I copy pasted above to CP. It took long and then gave this error:
Sorry, your request failed. Please try again.
Copilot Request id: 29c34aea-ca56-466e-9aae-323bdf737506
GH Request Id: D387:6836F:C216F9:FF965F:6990C40E
Reason: Request Failed: 400 {"type":"error","error":{"type":"invalid_request_error","message":"request body is not valid JSON: read tcp 10.125.88.50:2206-\u003e10.125.114.128:8355: i/o timeout"}}
----------------------------
After discussion with ChatGPT (CG), here's an assessment of the above work in context of agentic coding:
Copilot generated and transformed code, but it did not run, test, or debug the project on its own — the execution and feedback loop remained entirely with me, which is why this cannot be considered agentic coding.
With OpenAI Codex or Claude Code, the system would have run the code on its own, observed compiler or runtime output, evaluated whether the goal was met, modified the code if it was not, and looped through run–observe–evaluate–fix steps until success without re-prompting. This work is agentic coding.
-----
A message I sent to a friend:
You may already know that OpenAI Codex (coding agent like Claude code) has a limited-time free trial in ChatGPT Free and Go, https://developers.openai.com/codex/pricing/. When I checked recently, OpenAI Codex offered me a one-month free trial. It asks for card details and may enable automatic billing after the free period.
As of now, I am doing relatively low tech work of static web sites that can be hosted free on github.io which may be helpful for small non-profits that want a zero hosting cost website. My first effort in this direction was to do a minimal Next.js project for that. The bare minimum template version which is responsive (can be viewed on mobile as well as desktop) is done and is hosted at https://raviiyerss.in which is mapped to https://ravisiyer.github.io/stripdowncommghp/ . Of course, this landing page template has to be filled in with suitable images and details of the small nonprofit. Also, the site can be expanded to a more complex static site with many pages including a Contact Us form using free-tier services like that offered by https://web3forms.com/.
BTW I got the raviiyerss.in domain for around Rs.11 for a year from a sale on Hostinger. I disabled the auto renewal so that the much higher (perhaps in range of Rs. 900 per year) renewal does not automatically come into play.
Now I am trying out Astro for the same project as Astro is said to be superior to next.js for simple static websites. Yesterday I tried out GitHub CoPilot to help in the conversion of my Nextjs project to Astro. I simply said: "Can you read the source files of this Next.js project and create an equivalent Astro project?". After that, GitHub Copilot (using the Claude Haiku 4.5 model) effectively auto-converted the project by reading the Next.js source files and generating an equivalent Astro project. I was pleasantly surprised that with free GitHub CoPilot I could do that using Claude Haiku 4.5.
However, with the generated Astro project, I encountered errors. I navigated through the initial errors with Haiku help. But now I think I am at a point where I need to go through all the code and understand what Haiku has done and fix what I see as errors.
Perhaps if I use OpenAI Codex for this task, it will do a better job. But I want to reserve my one month free trial period for more complex Next.js or React Native app development. The downside is that this one month free trial period may not be there in future.
------------------
Comments
Post a Comment