Skip to content

when I use npm run build, it throws the error that useSearchParams() should be wrapped in a suspense boundary at page "/search" #98

Open
@comi-zhang

Description

info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
✓ Linting and checking validity of types
✓ Collecting page data
Generating static pages (2/7) [== ] ⨯ useSearchParams() should be wrapped in a suspense boundary at page "/search". Read more: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout
at o (C:\Users\Fine\SearchEngine\search_with_lepton\web.next\server\chunks\349.js:1:10784)
at s (C:\Users\Fine\SearchEngine\search_with_lepton\web.next\server\chunks\349.js:1:21720)
at lm (C:\Users\Fine\SearchEngine\search_with_lepton\web.next\server\app\search\page.js:1:219862)
at nj (C:\Users\Fine\SearchEngine\search_with_lepton\web\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:46251)
at nM (C:\Users\Fine\SearchEngine\search_with_lepton\web\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:47571)
at nN (C:\Users\Fine\SearchEngine\search_with_lepton\web\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:64546)
at nI (C:\Users\Fine\SearchEngine\search_with_lepton\web\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:47010)
at nM (C:\Users\Fine\SearchEngine\search_with_lepton\web\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:47717)
at nM (C:\Users\Fine\SearchEngine\search_with_lepton\web\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:61546)
at nN (C:\Users\Fine\SearchEngine\search_with_lepton\web\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:12:64546)

Error occurred prerendering page "/search". Read more: https://nextjs.org/docs/messages/prerender-error

✓ Generating static pages (7/7)

Export encountered errors on following paths:
/search/page: /search

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions