hellotham / hello-astro

Hello Astro is a multi purpose Astro starter theme written in Typescript, TailwindCSS and AlpineJS. It supports Markdown and MDX based pages and blog posts.
https://hellotham.github.io/hello-astro
MIT License
166 stars 56 forks source link

Cannot read properties of undefined (reading 'set') after upgrade to 2.8.0 #build #18

Open jojojojojoj5564656465465 opened 1 year ago

jojojojojoj5564656465465 commented 1 year ago

error here : src/pages/blog/[slug].astro


Cannot read properties of undefined (reading 'set')
  File:
    src/pages/blog/[slug].astro
  Stacktrace:
TypeError: Cannot read properties of undefined (reading 'set')
    at factory (file:///home/manjaro/DEV/sup/hello-astro/dist/chunks/2023-06-10-sample-gallery-post-markdoc.394cd6e2.mjs:64:26)
    at AstroComponentInstance.factory (file:///home/manjaro/DEV/sup/hello-astro/dist/chunks/astro.a9f939f3.mjs:1131:12)
    at AstroComponentInstance.init (file:///home/manjaro/DEV/sup/hello-astro/dist/chunks/astro.a9f939f3.mjs:1664:29)
    at AstroComponentInstance.render (file:///home/manjaro/DEV/sup/hello-astro/dist/chunks/astro.a9f939f3.mjs:1669:18)
    at render.next (<anonymous>)
    at renderChild (file:///home/manjaro/DEV/sup/hello-astro/dist/chunks/astro.a9f939f3.mjs:1727:18)
    at async EagerAsyncIterableIterator.next (file:///home/manjaro/DEV/sup/hello-astro/dist/chunks/astro.a9f939f3.mjs:1486:14)
    at async renderChild (file:///home/manjaro/DEV/sup/hello-astro/dist/chunks/astro.a9f939f3.mjs:1731:5)
    at async renderAstroTemplateResult (file:///home/manjaro/DEV/sup/hello-astro/dist/chunks/astro.a9f939f3.mjs:1606:24)
    at async renderChild (file:///home/manjaro/DEV/sup/hello-astro/dist/chunks/astro.a9f939f3.mjs:1725:5)
    at async renderSlot (file:///home/manjaro/DEV/sup/hello-astro/dist/chunks/astro.a9f939f3.mjs:1751:5)
    at async renderSlotToString (file:///home/manjaro/DEV/sup/hello-astro/dist/chunks/astro.a9f939f3.mjs:1761:20)
    at async Promise.all (index 0)
    at async renderSlots (file:///home/manjaro/DEV/sup/hello-astro/dist/chunks/astro.a9f939f3.mjs:1777:5)
    at async renderFrameworkComponent (file:///home/manjaro/DEV/sup/hello-astro/dist/chunks/astro.a9f939f3.mjs:2422:42)
    at async bufferHeadContent (file:///home/manjaro/DEV/sup/hello-astro/node_modules/.pnpm/astro@2.8.0/node_modules/astro/dist/runtime/server/render/page.js:44:25)
    at async renderPage (file:///home/manjaro/DEV/sup/hello-astro/node_modules/.pnpm/astro@2.8.0/node_modules/astro/dist/runtime/server/render/page.js:99:5)
    at async renderPage (file:///home/manjaro/DEV/sup/hello-astro/node_modules/.pnpm/astro@2.8.0/node_modules/astro/dist/core/render/core.js:41:18)
    at async generatePath (file:///home/manjaro/DEV/sup/hello-astro/node_modules/.pnpm/astro@2.8.0/node_modules/astro/dist/core/build/generate.js:446:20)
    at async generatePage (file:///home/manjaro/DEV/sup/hello-astro/node_modules/.pnpm/astro@2.8.0/node_modules/astro/dist/core/build/generate.js:206:5)
    at async generatePages (file:///home/manjaro/DEV/sup/hello-astro/node_modules/.pnpm/astro@2.8.0/node_modules/astro/dist/core/build/generate.js:133:7)
    at async staticBuild (file:///home/manjaro/DEV/sup/hello-astro/node_modules/.pnpm/astro@2.8.0/node_modules/astro/dist/core/build/static-build.js:84:7)
    at async AstroBuilder.build (file:///home/manjaro/DEV/sup/hello-astro/node_modules/.pnpm/astro@2.8.0/node_modules/astro/dist/core/build/index.js:118:5)
    at async AstroBuilder.run (file:///home/manjaro/DEV/sup/hello-astro/node_modules/.pnpm/astro@2.8.0/node_modules/astro/dist/core/build/index.js:149:7)
    at async build (file:///home/manjaro/DEV/sup/hello-astro/node_modules/.pnpm/astro@2.8.0/node_modules/astro/dist/core/build/index.js:37:3)
    at async runCommand (file:///home/manjaro/DEV/sup/hello-astro/node_modules/.pnpm/astro@2.8.0/node_modules/astro/dist/cli/index.js:219:14)
    at async cli (file:///home/manjaro/DEV/sup/hello-astro/node_modules/.pnpm/astro@2.8.0/node_modules/astro/dist/cli/index.js:260:5)

 ELIFECYCLE  Command failed with exit code 1.
 ```
jojojojojoj5564656465465 commented 1 year ago

also the markdoc config file has been updated

ChristineTham commented 1 year ago

It should build if you upgrade astro to 2.80 and @astrojs/markdoc to 0.4.1 (apparently the version numbers need to match between the two packages).

Or upgrade to the current latest of both.

I have updated the main branch so that it builds locally. However, I am running into this issue trying to deploy into Github Pages with the 'base' configuration parameter set.

https://github.com/withastro/astro/issues/7520