Skip to content

fix(solutions/blog): resolve React version conflict error and async params bug #1122

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kxzb-fun
Copy link

Description

When I visit the blog details page (http://localhost:3003/blog/vim), the following error occurs:

at Blog (app/blog/[slug]/page.tsx:55:28)
  53 |
  54 | export default function Blog({ params }) {
> 55 |   let post = getBlogPosts().find((post) => post.slug === params.slug)
     |                                                                ^
  56 |
  57 |   if (!post) {
  58 |     notFound()
Error: Route "/blog/[slug]" used `params.slug`. `params` should be awaited before using its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis

and warnning:

Server   Error: Route "/blog/[slug]" used `params.slug`. `params` should be awaited before using its properties. Learn more: https://nextjs.org/docs/messages/sync-dynamic-apis
    at eval (page.tsx:55:65)
    at Blog (page.tsx:55:29)

so, I updated all of the dependencies and fixed warnning

Demo URL

Type of Change

  • New Example
  • Example updates (Bug fixes, new features, etc.)
  • Other (changes to the codebase, but not to examples)

New Example Checklist

  • 🛫 npm run new-example was used to create the example
  • 📚 The template wasn't used but I carefuly read the Adding a new example steps and implemented them in the example
  • 📱 Is it responsive? Are mobile and tablets considered?

Copy link

vercel bot commented Apr 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
app-dir-css-in-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:43am
app-dir-i18n ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:43am
app-dir-share-state ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:43am
edge-functions-cookies ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:43am
edge-functions-news ❌ Failed (Inspect) Apr 11, 2025 1:43am
edge-functions-streams ❌ Failed (Inspect) Apr 11, 2025 1:43am
edge-geolocation-country-block ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:43am
edge-middleware-modify-request-header ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:43am
edge-user-agent-based-rendering ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:43am
example-reduce-image-bandwidth-usage ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:43am
i18n ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:43am
next-edge-api-route-hello-world ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:43am
nodejs-api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:43am
solutions-combining-data-fetching-strategies ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:43am
solutions-image-fallback ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:43am
solutions-image-offset ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:43am
solutions-loading-web-fonts ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:43am
solutions-microfrontends ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:43am
solutions-microfrontends-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:43am
solutions-pagination-with-ssg ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:43am
solutions-parallel-routes-navbar ❌ Failed (Inspect) Apr 11, 2025 1:43am
solutions-reuse-responses ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:43am
solutions-script-component-ad ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:43am
solutions-script-component-strategies ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 11, 2025 1:43am

Copy link

vercel bot commented Apr 11, 2025

@kxzb-fun is attempting to deploy a commit to the Vercel Examples Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub ↗.

Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/@tailwindcss/[email protected] ⏵ 4.1.310010080 +999 +1100
Updatednpm/[email protected] ⏵ 5.0.098 -11001008881 +11
Updatednpm/@vercel/[email protected] ⏵ 1.2.093 +110085 +194 +4100
Updatednpm/[email protected] ⏵ 1.3.110010010086 +290
Updatednpm/[email protected] ⏵ 0.9.3100100100 +194 +3100

View full report ↗

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

Successfully merging this pull request may close these issues.

1 participant