Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jojojojojoj5564656465465 opened this issue Jul 9, 2023 · 2 comments

Comments

@jojojojojoj5564656465465
Copy link

jojojojojoj5564656465465 commented Jul 9, 2023

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/[email protected]/node_modules/astro/dist/runtime/server/render/page.js:44:25)
    at async renderPage (file:///home/manjaro/DEV/sup/hello-astro/node_modules/.pnpm/[email protected]/node_modules/astro/dist/runtime/server/render/page.js:99:5)
    at async renderPage (file:///home/manjaro/DEV/sup/hello-astro/node_modules/.pnpm/[email protected]/node_modules/astro/dist/core/render/core.js:41:18)
    at async generatePath (file:///home/manjaro/DEV/sup/hello-astro/node_modules/.pnpm/[email protected]/node_modules/astro/dist/core/build/generate.js:446:20)
    at async generatePage (file:///home/manjaro/DEV/sup/hello-astro/node_modules/.pnpm/[email protected]/node_modules/astro/dist/core/build/generate.js:206:5)
    at async generatePages (file:///home/manjaro/DEV/sup/hello-astro/node_modules/.pnpm/[email protected]/node_modules/astro/dist/core/build/generate.js:133:7)
    at async staticBuild (file:///home/manjaro/DEV/sup/hello-astro/node_modules/.pnpm/[email protected]/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/[email protected]/node_modules/astro/dist/core/build/index.js:118:5)
    at async AstroBuilder.run (file:///home/manjaro/DEV/sup/hello-astro/node_modules/.pnpm/[email protected]/node_modules/astro/dist/core/build/index.js:149:7)
    at async build (file:///home/manjaro/DEV/sup/hello-astro/node_modules/.pnpm/[email protected]/node_modules/astro/dist/core/build/index.js:37:3)
    at async runCommand (file:///home/manjaro/DEV/sup/hello-astro/node_modules/.pnpm/[email protected]/node_modules/astro/dist/cli/index.js:219:14)
    at async cli (file:///home/manjaro/DEV/sup/hello-astro/node_modules/.pnpm/[email protected]/node_modules/astro/dist/cli/index.js:260:5)

 ELIFECYCLE  Command failed with exit code 1.
 ```
@jojojojojoj5564656465465 jojojojojoj5564656465465 changed the title Cannot read properties of undefined (reading 'set') after upgrade to 2.8.0 Cannot read properties of undefined (reading 'set') after upgrade to 2.8.0 #build Jul 9, 2023
@jojojojojoj5564656465465
Copy link
Author

also the markdoc config file has been updated

@ChristineTham
Copy link
Collaborator

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.

withastro/astro#7520

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants