This contains repros for:
The only changes from the base installation were:
- Adding
basePath: '/test/path'
tonext.config.js
- Adding example pages in
/app
and/pages
This repo is hosted at https://nextjs-proxy-test-ten.vercel.app/test/path
I added an _error.ts
page that outputs the headers it sees. Maybe that would help.
Soft navigation not working on [dynamic segments] when using nextConfig.basePath & new /app directory #48305
Open inspector, and go to https://nextjs-proxy-test-ten.vercel.app/test/path
You can see that preloads to routes with dynamic segments, or any routes inside /pages
, result in a 404:
Clicking on any of those links navigates to the correct page, but with a full page load. The same 404 behavior happens on any of the pages.
Other notes:
The 404 that shows in inspector entirely skips any error handling in the /app
folder (ie not-found.js
,error.js
, global-error.js
). To effect any change in the error output, I had to add a /pages/_error.js
file.
Links at basePath not working for random internal links #46648
Go to https://nextjs-proxy-test-ten.vercel.app/test/path/pages-page
Follow any link on that page. You'll see:
- Hovering over the link shows the correct URL
- Clicking the link results in the
basePath
being added twice.
This is a Next.js project bootstrapped with create-next-app
.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx
. The page auto-updates as you edit the file.
http://localhost:3000/api/hello is an endpoint that uses Route Handlers. This endpoint can be edited in app/api/hello/route.ts
.
This project uses next/font
to automatically optimize and load Inter, a custom Google Font.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.