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

Error clicking on blog link #57

Closed
frascu opened this issue Nov 12, 2022 · 6 comments
Closed

Error clicking on blog link #57

frascu opened this issue Nov 12, 2022 · 6 comments

Comments

@frascu
Copy link
Contributor

frascu commented Nov 12, 2022

In order to execute the project in my local environment, I executed the following commands:

npm install
npm run dev

The page http://localhost:3000 works, but when I click on blog link (http://localhost:3000/blog) I get this error:

 error   Missing or empty required params property on getStaticPaths route
  Hint:
    See https://docs.astro.build/en/reference/api-reference/#getstaticpaths for more information on getStaticPaths.
  File:
    /home/francesco/MyApp/website/src/pages/[...tags]/[tag]/[...page].astro
  Stacktrace:
GetStaticPathsExpectedParams: Missing or empty required params property on getStaticPaths route
    at file:///home/francesco/MyApp/website/node_modules/astro/dist/core/routing/validation.js:42:13
    at Array.forEach (<anonymous>)
    at validateGetStaticPathsResult (file:///home/francesco/MyApp/website/node_modules/astro/dist/core/routing/validation.js:40:10)
    at callGetStaticPaths (file:///home/francesco/MyApp/website/node_modules/astro/dist/core/render/route-cache.js:28:5)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async getParamsAndProps (file:///home/francesco/MyApp/website/node_modules/astro/dist/core/render/core.js:24:25)
    at async matchRoute (file:///home/francesco/MyApp/website/node_modules/astro/dist/vite-plugin-astro-server/route.js:27:31)
    at async run (file:///home/francesco/MyApp/website/node_modules/astro/dist/vite-plugin-astro-server/request.js:38:28)
    at async runWithErrorHandling (file:///home/francesco/MyApp/website/node_modules/astro/dist/vite-plugin-astro-server/controller.js:65:5)
    at async handleRequest (file:///home/francesco/MyApp/website/node_modules/astro/dist/vite-plugin-astro-server/request.js:34:3)
@ika-codes
Copy link

I'm having the same issue, looking forward to some kind of fix or idea how to resolve this error.

@jack-nui
Copy link

Can confirm I'm also having this issue.

@mhaidarhanif
Copy link

mhaidarhanif commented Nov 14, 2022

I tried solving it by downgrading astro to 1.6.5 for now. It works for a quick fix.

Update: in 1.6.8 it's said to have it fixed. So either downgrade to 1.6.5 or upgrade to 1.6.8 if the issue still occurs.

In 1.6.7:

  🚀  astro  v1.6.7 started in 724ms

  ┃ Local    http://localhost:3000/
  ┃ Network  use --host to expose

07:47:15 AM [getStaticPaths] A getStaticPaths route pattern was matched, but no matching static path was found for requested path /sw.js.

Possible dynamic routes being matched: src/pages/[...tags]/[tag]/[...page].astro, src/pages/[...categories]/[category]/[...page].astro, src/pages/[...blog]/[slug].astro, src/pages/[...blog]/[...page].astro.

In 1.6.5:

🚀  astro  v1.6.5 started in 827ms

  ┃ Local    http://localhost:3000/
  ┃ Network  use --host to expose

07:50:57 AM [getStaticPaths] Route pattern matched, but no matching static path found. (/sw.js)
07:50:57 AM [serve]    404                                   /sw.js

Screenshot on /blog:

Screenshot

Modified template: https://github.com/mhaidarhanif/astrowind

@makash
Copy link

makash commented Nov 14, 2022

Confirmed by Astro developers in their discord. Some error that will be fixed today

image

@frascu
Copy link
Contributor Author

frascu commented Nov 14, 2022

It has been fixed in this pull request withastro/astro#5375 that will be released in 1.6.8 (withastro/astro#5365).

@prototypa
Copy link
Contributor

Hello and thanks to everyone. I'm late to see this, I was on vacation and with very little connection.

For now I have fixed the version of Astro at 1.6.5 until the new version 1.6.8 comes out with withastro/astro#5375. Depending on this, everything will be fine or we will have to make adjustments to AstroWind.

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

6 participants