Comments (7)
@G0rav Hey, sorry no. Still have the project on hold, I haven't been experimenting with it. have my hands full of work on some other stuff.
from next.js.
Hey there. Indeed i'm having the same issue with the same template, although I rolled custom internalization the issue stays the same. Imported MDX content doesn't translate (if you try wrap items in t() you get undefined on vercel prod environment, but works fine on my local dev environment. However, doing the same but without t() works just fine. Most likely I'll walk away from mdx in this case.
I'm curious if you made any progress debugging this?
from next.js.
I’ve put the project on pause as I have no way to track whats wrong effectively. My issue was with static/dynamic paths, I think. Not with mdx files not translating. What alternative will you use @Guccifer808?
from next.js.
@Patrik-Tkacik I've switched from .mdx to an array of objects works flawlessly.
My issue was with static/dynamic paths, I think. Not with .mdx files not translating
According to my tests .mdx in defined and renders fine in prod, it's the object inside it that returns undefined in prod. Thus, dynamic paths (in my case app/[lang]/) were not an issue. Moreover, all other parts of the app have no issues, only objects inside .mdx
from next.js.
Hi, any luck with the solution?
It's not working for me as well. Everything works well on local dev but on production, it doesn't loads the content of .mdx file. Moreover, it doesn't produce any error so it is hard to understand what's wrong.
from next.js.
@Guccifer808 so you made a static array instead of dynamically fetching it?
from next.js.
@Guccifer808 so you made a static array instead of dynamically fetching it?
I made loader similar to mdxloader just migrated to array of objects:
import { allBrandsData, brandsNames } from '@/data/allBrandsData'
/**
- Loads brand data based on the provided parameter.
- @param {string} type - The type of data to load. Can be 'data' for all brand data or 'names' for brand names.
- @returns {Promise<Array|Object|null>} - Returns the requested data or null if the parameter is invalid.
*/
export async function loadBrandData(type) {
try {
switch (type) {
case 'data':
return allBrandsData
case 'names':
return brandsNames
default:
console.warn(Invalid parameter: ${type}. Expected 'data' or 'names'.
)
return null
}
} catch (error) {
console.error(Error loading brand data: ${error.message}
)
throw error
}
}
from next.js.
Related Issues (20)
- Double RSC fetch after server action redirect HOT 1
- Docs: Issue Next 14 generate a localized sitemap HOT 5
- Error: 'No such file or directory' when using `fs.readFileSync`
- create-next-app --empty with src dir and tailwindcss has problem HOT 1
- bug: Next has been hot updated continuously since it started HOT 4
- Unsupported Node.js version! Your version: undefined HOT 2
- SWR and @here/maps-api-for-javascript prod build HOT 2
- Debugging with NODE_OPTIONS='--inspect=0.0.0.0' return error: /usr/bin/node: must be 0 or in range 1024 to 65535.
- CSS pseudo-class `:is` is not compiled correctly in dev mode on 14.2 using turbopack HOT 2
- Docs: Broken link in Docs Contribution Guide HOT 1
- Bug with server action redirect with layout using suspense HOT 1
- Server action redirect does not show content as it streams in if layout uses suspense HOT 1
- provide you with the best experience possible HOT 1
- `useEffect` no longer run twice in React strict mode HOT 2
- Unable to import exports from client component files in non-component files
- with just the click of a button, giving HOT 1
- 100% WORKING***The Ultimate V Bucks Codes Generator 2024-2025: A Complete Review HOT 1
- Dependency Resolution Issue when Installing Shadcn in Next.js 15 HOT 1
- [Local Build] API routes that use `revalidate`cannot be revalidated
- Next.js uses <script> tag to load css files in static export HOT 5
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.