saicaca / fuwari

✨A static blog template built with Astro.
https://fuwari.vercel.app
MIT License
1.17k stars 254 forks source link

TypeError: Cannot read properties of undefined (reading 'data') #97

Open kirkzhangtech opened 4 months ago

kirkzhangtech commented 4 months ago
  1. pnpm new-post golang
  2. put some arbitrary content
  3. git add .
  4. git commit
  5. git push
  6. got below error
    TypeError: Cannot read properties of undefined (reading 'data')
    at /home/kirkzhang/github_workspace/fuwari/src/pages/[...page].astro:17:18
    at [...page] (/home/kirkzhang/github_workspace/fuwari/node_modules/.pnpm/astro@4.9.2_@types+node@20.12.13_lightningcss@1.25.1_stylus@0.63.0_terser@5.31.0_typescript@5.4.5/node_modules/astro/dist/runtime/server/astro-component.js:16:12)
    at callComponentAsTemplateResultOrResponse (file:///home/kirkzhang/github_workspace/fuwari/node_modules/.pnpm/astro@4.9.2_@types+node@20.12.13_lightningcss@1.25.1_stylus@0.63.0_terser@5.31.0_typescript@5.4.5/node_modules/astro/dist/runtime/server/render/astro/render.js:90:31)
    at renderToAsyncIterable (file:///home/kirkzhang/github_workspace/fuwari/node_modules/.pnpm/astro@4.9.2_@types+node@20.12.13_lightningcss@1.25.1_stylus@0.63.0_terser@5.31.0_typescript@5.4.5/node_modules/astro/dist/runtime/server/render/astro/render.js:118:32)
    at renderPage (file:///home/kirkzhang/github_workspace/fuwari/node_modules/.pnpm/astro@4.9.2_@types+node@20.12.13_lightningcss@1.25.1_stylus@0.63.0_terser@5.31.0_typescript@5.4.5/node_modules/astro/dist/runtime/server/render/page.js:31:30)
    at lastNext (file:///home/kirkzhang/github_workspace/fuwari/node_modules/.pnpm/astro@4.9.2_@types+node@20.12.13_lightningcss@1.25.1_stylus@0.63.0_terser@5.31.0_typescript@5.4.5/node_modules/astro/dist/core/render-context.js:126:31)
    at async callMiddleware (file:///home/kirkzhang/github_workspace/fuwari/node_modules/.pnpm/astro@4.9.2_@types+node@20.12.13_lightningcss@1.25.1_stylus@0.63.0_terser@5.31.0_typescript@5.4.5/node_modules/astro/dist/core/middleware/callMiddleware.js:21:10)
    at async RenderContext.render (file:///home/kirkzhang/github_workspace/fuwari/node_modules/.pnpm/astro@4.9.2_@types+node@20.12.13_lightningcss@1.25.1_stylus@0.63.0_terser@5.31.0_typescript@5.4.5/node_modules/astro/dist/core/render-context.js:149:22)
    at async handleRoute (file:///home/kirkzhang/github_workspace/fuwari/node_modules/.pnpm/astro@4.9.2_@types+node@20.12.13_lightningcss@1.25.1_stylus@0.63.0_terser@5.31.0_typescript@5.4.5/node_modules/astro/dist/vite-plugin-astro-server/route.js:209:18)
    at async run (file:///home/kirkzhang/github_workspace/fuwari/node_modules/.pnpm/astro@4.9.2_@types+node@20.12.13_lightningcss@1.25.1_stylus@0.63.0_terser@5.31.0_typescript@5.4.5/node_modules/astro/dist/vite-plugin-astro-server/request.js:40:14)
saicaca commented 3 months ago

Could you please provide more detailed information, such as the operating system and Node.js version, or alternatively, a demo that reproduces the issue?

MasakiMu319 commented 2 months ago

You can try switching to node version 18. I tried compiling under node version 22 and encountered the same error.