You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm attempting to build a static site from the nextjs app. When I add output: 'export', to my next.config.js file I get the error Error: Page "/blockexplorer/transaction/[txHash]" is missing "generateStaticParams()" so it cannot be used with "output: export" config.
I've looked around, and apparently this is an issue with combining dynamic routes with "use state".
Expected Behavior
I would hope that out of the box I could export the nextjs app without having to re-write any files. Would be great to host on IPFS or other static site hosting platforms, which there probably is a way other than how I'm trying to do it -- will look deeper into the documentation.
Steps To Reproduce
clone, add output: 'export', to next.config.js file, move into the packages/nextjs repo then yarn install && yarn build
Anything else?
Nope, awesome repo guys :)
The text was updated successfully, but these errors were encountered:
Hey thanks for raising it 🙌, I think for now the only solution is to mark blockexplorer/address and blockexplorer/transaction as private by appending _ before their name, example :
(Instead of marking both files as private we could mark whole blockexplorer dir as private before deploying, but due to import alias the build fails, something which can fixed on SE-2 side)
But any which ways I people need to manually mark the dir's as private before deploying.
Ideally this should have been solved if we have used useParams in blockexplorer/address/[address]/page.ts and same for [txHash]/page.ts instead of relying on Next Page props
Is there an existing issue for this?
Which method was used to setup Scaffold-ETH 2 ?
git clone
Current Behavior
I'm attempting to build a static site from the nextjs app. When I add
output: 'export',
to my next.config.js file I get the errorError: Page "/blockexplorer/transaction/[txHash]" is missing "generateStaticParams()" so it cannot be used with "output: export" config.
I've looked around, and apparently this is an issue with combining dynamic routes with "use state".
Expected Behavior
I would hope that out of the box I could export the nextjs app without having to re-write any files. Would be great to host on IPFS or other static site hosting platforms, which there probably is a way other than how I'm trying to do it -- will look deeper into the documentation.
Steps To Reproduce
clone, add
output: 'export',
to next.config.js file, move into thepackages/nextjs
repo thenyarn install && yarn build
Anything else?
Nope, awesome repo guys :)
The text was updated successfully, but these errors were encountered: