An open API service indexing awesome lists of open source software.

https://github.com/statico/nextjs-yarn2-getserversideprops-bug


https://github.com/statico/nextjs-yarn2-getserversideprops-bug

Last synced: 8 months ago
JSON representation

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