-
Notifications
You must be signed in to change notification settings - Fork 92
Closed
Labels
type: bugcode to address defects in shipped codecode to address defects in shipped codev4Issues related to the v4 Next.js runtimeIssues related to the v4 Next.js runtime
Description
Summary
Passed props from getServerSideProps() and getStaticProps() are undefined if navigating to the same route. Tested with multiple versions of Next.js: 13.4.13-13.4.19 and only occurs when app is built with the Netlify plugin. The problem is not observed with Next.js 13.4.12.
A link to a reproduction repository
https://github.com/thevisioner/test-netlify-next-page-props-issue
Expected Result
Return values from getServerSideProps() and getStaticProps() are expected to be passed to the page component.
Actual Result
All passed props from getServerSideProps() and getStaticProps() are undefined in the page component ar client render stage.
Steps to reproduce
- Install project dependencies:
npm i - Using the Netlify CLI, run:
netlify serve - When the page is displayed, open any subpage, for example:
/test - Pay attention to the fact that initially all values are present
- Click on any presented link (goes to the same route)
- Pay attention to the fact that props are now undefined
Next Runtime version
4.40.1
Is your issue related to the app directory?
- Yes, I am using the
appdirectory
More information about your build
- I am building using the CLI
- I am building using file-based configuration (
netlify.toml)
What OS are you using?
Windows
Your netlify.toml file
`netlify.toml`
[build]
command = "npm run build"
publish = ".next"
[[plugins]]
package = "@netlify/plugin-nextjs"Your public/_redirects file
`_redirects`
# Paste content of your `_redirects` file here
Your next.config.js file
`next.config.js`
/** @type {import('next').NextConfig} */
const nextConfig = {}
module.exports = nextConfigBuilds logs (or link to your logs)
Build logs
# Paste logs here
Function logs
Function logs
# Paste logs here
.next JSON files
generated .next JSON files
# Paste file contents here. Please check there isn't any private info in them
# You can either build locally, or download the deploy from Netlify by clicking the arrow next to the deploy time.
darkkatarsis
Metadata
Metadata
Assignees
Labels
type: bugcode to address defects in shipped codecode to address defects in shipped codev4Issues related to the v4 Next.js runtimeIssues related to the v4 Next.js runtime