Comments (11)
We've opened a fix here: #64678
from next.js.
I bumped into this issue after upgrading to v14.2
just now. I have almost the exact same config as OP.
I guess this makes it so that the matcher is not respected and it applies to all routes? 🤔
from next.js.
+1, have the exact same issue with same config too. Seems to be a 14.2 specific thing.
from next.js.
It looks like the parsing is incomplete at:
next.js/packages/next-swc/crates/next-core/src/util.rs
Lines 375 to 387 in 6a1e70a
matchers
array.from next.js.
I get the same issue when turning on --turbo with nextjs 14.2.1 with this matcher:
[
{
source: '/((?!api|_next/static|_next/image|__nextjs|.*\\..*|favicon.ico|auth/).*)',
missing: [
{ type: 'header', key: 'next-router-prefetch' },
{ type: 'header', key: 'purpose', value: 'prefetch' },
],
},
]
from next.js.
+1, have the exact same issue, exact same config
export const config = {
matcher: [
{
source: "/((?!api|_next/static|_next/image|favicon.ico).*)",
missing: [
{ type: "header", key: "next-router-prefetch" },
{ type: "header", key: "purpose", value: "prefetch" },
],
},
],
};
Unable to parse config export in source file
The exported configuration object in a source file need to have a very specific format from which some properties can be statically parsed at compiled-time.
from next.js.
Can you please check the issue reproduce example link is unavailable.
from next.js.
Can you please check the issue reproduce example link is unavailable.
Updated link
from next.js.
export const config = {
matcher: [
/*
* Match all request paths except for the ones starting with:
* - api (API routes)
* - _next/static (static files)
* - _next/image (image optimization files)
* - favicon.ico (favicon file)
*/
{
source: '/((?!api|_next/static|_next/image|favicon.ico).*)',
missing: [
{ type: 'header', key: 'next-router-prefetch' },
{ type: 'header', key: 'purpose', value: 'prefetch' },
],
},
],
}
14.2.1
from next.js.
As always you guys rock. Thank you
from next.js.
Thanks @timneutkens and team! Appreciate the fix!
from next.js.
Related Issues (20)
- LangChain not compatible with Next.js 14.2.x and causing error in server component rendering.
- <Link> doesn't navigate to the intercepted route in specific scenario
- Should be able to invalidate an in-flight server action via middleware HOT 1
- Error occurs when opening client page with turbopack enabled in "output: export" mode
- Vercel Deployment Error: Middleware Invocation Failure (Status 500) HOT 1
- Vercel Deployment Error: Middleware Invocation Failure (Status 500)
- Dynamically Imported Components unmount unexpectedly during Hydration if any parent React context updates
- React does not recognize the `fetchPriority` prop on a DOM element. HOT 9
- router.back() causes an error on intercepted route
- Inconsistently managing .env files between edge and nodejs runtimes HOT 1
- Error 500: The detected locale does not match the locale in the query
- force-dynamic no longer opts out of Data Caching since v14.2.0 HOT 3
- Docs: Image onLoadingComplete code block does not show on 'use client' HOT 1
- Response cookies missing in middleware HOT 2
- Fail to patch lock while when a dependency is depending on a different version of Next.js
- Docs: Confusing/Incomplete docs for setting page title (App Router) HOT 1
- Route interception broken in production mode, although working in development mode
- Cdn problem with App Router HOT 2
- On refereshing the page redirect to the homepage automatically HOT 1
- Dynamic metadata and RSC causing loader to be hidden without a page to render.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from next.js.