ElianCodes / brutal

A neobrutalism Astro starter theme
https://brutal.elian.codes/
MIT License
302 stars 42 forks source link

Rendering issue with blogpost layout #75

Closed jriou closed 5 months ago

jriou commented 5 months ago

Hi,

I'm trying out your template -- excellent work mate! But I'm having this issue that comes back from time to time. I have not been able to reproduce it or track it down. I suspect it comes from dependencies? Probably something minor, sorry I'm a noob with JS.

Describe the bug

I have a TypeError Cannot read properties of undefined (reading 'render') whenever I open a blog post. I did't change anything in the blogpost layout. As I wrote it sometimes work, sometimes not.

TypeError: Cannot read properties of undefined (reading 'render')
    at /home/julien/cloud/aides/maurane/psgc/psgc/src/pages/blog/[slug].astro:18:36
    at [slug] (/home/julien/cloud/aides/maurane/psgc/psgc/node_modules/astro/dist/runtime/server/astro-component.js:18:12)
    at callComponentAsTemplateResultOrResponse (file:///home/julien/cloud/aides/maurane/psgc/psgc/node_modules/astro/dist/runtime/server/render/astro/render.js:90:31)
    at renderToAsyncIterable (file:///home/julien/cloud/aides/maurane/psgc/psgc/node_modules/astro/dist/runtime/server/render/astro/render.js:118:32)
    at renderPage (file:///home/julien/cloud/aides/maurane/psgc/psgc/node_modules/astro/dist/runtime/server/render/page.js:31:30)
    at lastNext (file:///home/julien/cloud/aides/maurane/psgc/psgc/node_modules/astro/dist/core/render-context.js:87:31)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async callMiddleware (file:///home/julien/cloud/aides/maurane/psgc/psgc/node_modules/astro/dist/core/middleware/callMiddleware.js:11:10)
    at async RenderContext.render (file:///home/julien/cloud/aides/maurane/psgc/psgc/node_modules/astro/dist/core/render-context.js:110:22)
    at async handleRoute (file:///home/julien/cloud/aides/maurane/psgc/psgc/node_modules/astro/dist/vite-plugin-astro-server/route.js:212:18)
    at async run (file:///home/julien/cloud/aides/maurane/psgc/psgc/node_modules/astro/dist/vite-plugin-astro-server/request.js:42:14)
    at async runWithErrorHandling (file:///home/julien/cloud/aides/maurane/psgc/psgc/node_modules/astro/dist/vite-plugin-astro-server/controller.js:64:5)
    at async handleRequest (file:///home/julien/cloud/aides/maurane/psgc/psgc/node_modules/astro/dist/vite-plugin-astro-server/request.js:36:3)

Any tips very much appreciated!