-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
How to reproduce: npm run install npm run preview localhost:3000/api/draft?secret=secret-token&slug=preview-page Gives: Error: Invariant: previewProps missing previewModeId this should never happen This repo (except this last commit) comes from this rather similar, but fixed, issue: vercel/next.js#67075 The error is thrown in Nextjs from this line: https://github.com/vercel/next.js/blob/c839d589abf95d248398848081b8194e0d3aed5c/packages/next/src/server/async-storage/draft-mode-provider.ts#L52 Either because: - "this" is not defined here - "this._previewModeId" is not defined here Running npm run dev and hitting localhost:3000/api/draft?secret=secret-token&slug=preview-page doesn't fail. The middleware.ts file in this repo is irrellevant but I left it as is.
- Loading branch information
Showing
7 changed files
with
5,878 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,3 +34,6 @@ yarn-error.log* | |
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
#wrangler | ||
.wrangler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,13 @@ | ||
import { setupDevPlatform } from '@cloudflare/next-on-pages/next-dev'; | ||
|
||
/** | ||
* @type {import('next').NextConfig} | ||
*/ | ||
const nextConfig = { | ||
reactStrictMode: true, | ||
}; | ||
|
||
if (process.env.NODE_ENV === 'development') { | ||
await setupDevPlatform(); | ||
} | ||
export default nextConfig; |
Oops, something went wrong.