developit / developit/nextjs-preact-demo

How to build without `next export` (using getStaticPaths `fallback: true`)

Open
#28 1 comment 0 reactions 0 assignees View on GitHub
question
Dominant language
JavaScript
Stars
381
Forks
21
PR merge metrics
No merged PRs in 30d

Description

`build` is defined as `"build": "next build && next export -o build"` but it gives me the following build error:

Pages with `fallback` enabled in `getStaticPaths` can not be exported.
See more info here: https://err.sh/next.js/ssg-fallback-true-export

In a Next.js/React project I would just have:

"build": "next build"

but that gives this build error with Preact on Vercel:

Error: No Output Directory named "build" found after the Build completed.
You can configure the Output Directory in your Project Settings.
Learn More: https://vercel.link/missing-public-directory

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.