Next js typescript conditionally export a module
In Next.js (v.15 w/ App Router) i have 2 modules of server actions where i export the same functions, each with a different database, like so :
can’t build the project (NextJS)
When run in dev mode, it works, but I can’t build my code to production.
this is my code
How can I manage separate state for search results and product listings in a React app using the same API?
I am working on a React app where I fetch product listings and search results from the same API. However, I want to keep the state of the product page (productPageResults) and search results (searchResult) separate so that when a user performs a search, it doesn’t overwrite the product listings.
How to cache Next.js first page load compilation for local development
I’d like to speed up development in my TypeScript Next.js project.
How to cache Next.js first page load compilation for local development
I’d like to speed up development in my TypeScript Next.js project.
Having trouble in formatting the AI model’s response
I’m having trouble in formatting the response its making spaces in between of names and the response looks ugly so i need help to find a better approach.
Where or how do i store JWT access token in a next.js app router app?
I’ve got a backend that uses a JWT auth, when i log in, it sends me access token in the body of the response and refresh token in http-only cookies. I get the part with the refresh-token, it’s attached on every request, fine, but what about access token. What’s the most convinient way to store it?
NextJs MetadataRoute.Sitemap does not contain definition for alternates
The problem I’m trying to generate a sitemap with hreflang links for alternative languages. The nextJs documentation (https://nextjs.org/docs/app/api-reference/file-conventions/metadata/sitemap#generate-a-localized-sitemap) advises to create a sitemap with alternate urls, ie hreflangs, like this: import { MetadataRoute } from ‘next’; export default function sitemap(): MetadataRoute.Sitemap { return [ { url: ‘https://example.com’, lastModified: new Date(), alternates: { languages: { es: […]
sitemap.xml not working after build in Next.js
I’m working on a Next.js project where I need to generate a sitemap using sitemap.xml. The sitemap works perfectly in development, but after building the project for production, the /sitemap.xml URL returns no data.
Exception: TypeError: ‘caller’, ‘callee’, and ‘arguments’ properties may not be accessed on strict mode functions [closed]
Closed 4 days ago.