It seems like the error occurs with `next export` when building the current example.
```
$ cd examples/with-electron-typescript
$ yarn && yarn build
Error occurred prerendering page "/detail". Read more: https://err.sh/next.js/prerender-error
Error: Error for page /detail: pages with `getServerSideProps` can not be exported. See more info here: https://err.sh/next.js/gssp-export
Error: Export encountered errors on following paths:
/detail
at exportApp (/Users/kstg/src/github.com/zeit/next.js/examples/with-electron-typescript/node_modules/next/dist/export/index.js:22:1166)
error Command failed with exit code 1.
```
I changed routes to statically resolve pages generating from `pages/detail.tsx` and added `getStaticPaths` and `getStaticProps`. so then it will export as follows
```
yarn run v1.22.4
$ next build renderer && next export renderer
Creating an optimized production build...
Compiled successfully.
Automatically optimizing pages...
Page Size First Load JS
┌ ○ / 336 B 62.6 kB
├ ○ /404 2.54 kB 61.6 kB
├ ○ /about 338 B 62.6 kB
├ ● /detail/[id] 440 B 62.7 kB
├ ├ /detail/101
├ ├ /detail/102
├ ├ /detail/103
├ └ /detail/104
└ ● /initial-props 530 B 62.8 kB
+ First Load JS shared by all 59.1 kB
├ static/pages/_app.js 983 B
├ chunks/commons.9facbe.js 10.9 kB
├ chunks/framework.b76773.js 40.3 kB
├ runtime/main.800476.js 6.22 kB
└ runtime/webpack.c21266.js 746 B
λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
○ (Static) automatically rendered as static HTML (uses no initial props)
● (SSG) automatically generated as static HTML + JSON (uses getStaticProps)
> using build directory: /Users/kstg/src/github.com/zeit/next.js/examples/with-electron-typescript/renderer/.next
copying "static build" directory
> No "exportPathMap" found in "next.config.js". Generating map from "./pages"
launching 7 workers
Exporting (0/4)
Exporting (1/4)
Exporting (2/4)
Exporting (3/4)
Exporting (4/4)
Export successful
Done in 11.47s.
```
* Add release hook
* Remove release.js exported config
* Add skip flag to release CLI
* Use full flag name
* Upgrade release
* Update yarn.lock
Co-authored-by: Tim Neutkens <timneutkens@me.com>
jest retries seem to be masking test failures, like the `auto-export` one (and maybe others). I turned it off for now. The `auto-export` test fails when retries are turned off.
the output of this test failure was a bit unhelpful so I also improved it.
Many tests have anonymous page functions.
- Reduce jest retries to 2 for a total of 3 attempts
- Disable retries in `invalid-href` test. I noticed jest retries don't help when this test fails (see log output of https://github.com/vercel/next.js/runs/904147534).
* Add with-sitemap Example
* Update README
* Update examples/with-sitemap/scripts/generate-sitemap.js
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
* Update examples/with-sitemap/package.json
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
* Update examples/with-sitemap/public/sitemap.xml
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
* Update README
* Add .env Info to README
* Update examples/with-sitemap/README.md
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
* Update examples/with-sitemap/README.md
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
* Update examples/with-sitemap/README.md
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
* Update examples/with-sitemap/README.md
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
* More helpful README
Updated to include more details about Next.js, link to the interactive tutorial, showcase, etc. Content mostly based on the official Next.js site.
* create-next-app readme
An updated readme with more details on options, benefits, etc.
* Apply edits from code review
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
* Remove redundant intro
* Update packages/create-next-app/README.md
* Remove introduction and list in showcase
* Apply suggestions from code review
* Update packages/next/README.md
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* Update Sentry example for use with Sentry/Vercel integration
* update linting
* Update link in readme
* Update readme, add comment
* Add step about commit SHA
* Updated readme
* Use if
* dont call sentry webpack plugin w/o a commit sha present
* Update examples/with-sentry/README.md
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
* update release value
* prettier readme
* Updated note
Co-authored-by: Luis Alvarez <luis@vercel.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
* MongoDB Example
* Apply suggestions from code review
* Add changes based on feedback.
* clean up code with more descriptive props
* Use MongoDB in ServerSideProps instead of separate API route
* Update examples/with-mongodb/README.md
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
* Update examples/with-mongodb/README.md
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
* Update examples/with-mongodb/README.md
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
* Update examples/with-mongodb/README.md
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
* Update examples/with-mongodb/README.md
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
* Update examples/with-mongodb/README.md
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
* Update examples/with-mongodb/README.md
Co-authored-by: Luis Alvarez D. <luis@vercel.com>
Co-authored-by: Luis Alvarez D <luis@vercel.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>