https://github.com/statico/nextjs-yarn2-getserversideprops-bug
https://github.com/statico/nextjs-yarn2-getserversideprops-bug
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/statico/nextjs-yarn2-getserversideprops-bug
- Owner: statico
- Created: 2021-04-20T20:58:22.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-20T20:59:54.000Z (about 5 years ago)
- Last Synced: 2025-01-02T03:44:23.115Z (over 1 year ago)
- Language: JavaScript
- Size: 34.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Yarn 2 & `getServerSideProps` props test case
## What is this?
Returning `{notFound: true}` in a page's [`getServerSideProps`](https://nextjs.org/docs/basic-features/data-fetching#getserversideprops-server-side-rendering) in Next.js while using Yarn 2 results in the page never loading.
## Prerequisites
- Node 15.13.0
- Yarn 1.22.10
## Reproduction
1. Clone this
1. Run `yarn install`
1. Run `yarn run dev`
1. Navigate to http://localhost:3000/test which should show the Next.js 404 page, which is expected
1. Stop the server
1. Run `yarn set version berry`
1. Run `yarn install`
1. Run `yarn run dev`
1. Navigate to http://localhost:3000/test will hang forever and maybe show Webpack errors on the console