Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module '"next-intl/server"' has no exported member 'getRequestConfig' #538

Closed
nicitaacom opened this issue Oct 1, 2023 · 1 comment
Closed
Labels
bug Something isn't working unconfirmed Needs triage.

Comments

@nicitaacom
Copy link

Description

I use Next 13.5.3
I follow this guide - https://next-intl-docs.vercel.app/docs/getting-started/app-router-server-components
When I paste this to my i18n.ts (in root directory)

import {getRequestConfig} from 'next-intl/server';
 
export default getRequestConfig(async ({locale}) => ({
  messages: (await import(`./messages/${locale}.json`)).default
}));

I got this error
Module '"next-intl/server"' has no exported member 'getRequestConfig'

Mandatory reproduction URL (CodeSandbox or GitHub repository)

https://codesandbox.io/p/sandbox/i18n-thzc9v

Reproduction description

Steps to reproduce:

  1. Open codesandbox
  2. Click on VS conde in top right corner
  3. See error in i18n.ts

Expected behaviour

I wait no error
But got an error

@nicitaacom nicitaacom added bug Something isn't working unconfirmed Needs triage. labels Oct 1, 2023
@amannn
Copy link
Owner

amannn commented Oct 2, 2023

Any chance next-intl got installed incorrectly?

When I run your example I also get this error:

Screenshot 2023-10-02 at 16 59 21

Seems like your middleware.ts example is empty.

I'll move this to a discussion since it seems to be a usage question.

Repository owner locked and limited conversation to collaborators Oct 2, 2023
@amannn amannn converted this issue into discussion #541 Oct 2, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
bug Something isn't working unconfirmed Needs triage.
Projects
None yet
Development

No branches or pull requests

2 participants