https://github.com/jamsinclair/incompatible-href-as-repro
Reproduction of Next.js incompatible-href-as bug
https://github.com/jamsinclair/incompatible-href-as-repro
Last synced: 18 days ago
JSON representation
Reproduction of Next.js incompatible-href-as bug
- Host: GitHub
- URL: https://github.com/jamsinclair/incompatible-href-as-repro
- Owner: jamsinclair
- Created: 2021-05-06T04:41:43.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-05-06T05:23:27.000Z (almost 4 years ago)
- Last Synced: 2025-02-14T08:35:42.035Z (2 months ago)
- Language: JavaScript
- Size: 42 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `incompatible-href-as` reproduction with catch all and custom rewrite
**Next.js Issue:** [#24846](https://github.com/vercel/next.js/issues/24846)
This repo is a minimal reproduction of an odd https://nextjs.org/docs/messages/incompatible-href-as error with a custom server rewrite.
```
Error: The provided `as` value (/) is incompatible with the `href` value (/customer/[[...slug]]). Read more: https://nextjs.org/docs/messages/incompatible-href-as
```The key points of interest are:
- Have a Next app at stable v10.2.0 or above canary v10.1.4-canary.10
- Have a catch all route, e.g. `[[...slug]].js`
- Have rewrites configured in your next.config.js
- Have a url rewrite outside of the context of Next.js serverTo run this reproduction you will need [docker cli installed](https://docs.docker.com/get-docker/).
Simply run `docker compose up` and once the server is active visit http://localhost:8000