Skip to content
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

[bug] support for next.config.ts #1054

Open
mehdibha opened this issue Nov 15, 2024 · 1 comment
Open

[bug] support for next.config.ts #1054

mehdibha opened this issue Nov 15, 2024 · 1 comment
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@mehdibha
Copy link

To Reproduce

When i've switch to next.config.ts, i had this error:

> [email protected] dev C:\Users\mehdi\OneDrive\Bureau\dotUI\www
> next dev --turbo

node:internal/errors:497
    ErrorCaptureStackTrace(err);
    ^

Error: Package subpath './next' is not defined by "exports" in C:\Users\mehdi\OneDrive\Bureau\dotUI\www\node_modules\fumadocs-mdx\package.json
    at new NodeError (node:internal/errors:406:5)
    at exportsNotFound (node:internal/modules/esm/resolve:268:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:542:13)
    at resolveExports (node:internal/modules/cjs/loader:547:36)  
    at Module._findPath (node:internal/modules/cjs/loader:621:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1034:27)
    at C:\Users\mehdi\OneDrive\Bureau\dotUI\node_modules\.pnpm\n[email protected][email protected][email protected][email protected]\node_modules\next\dist\server\require-hook.js:55:36
    at Module._load (node:internal/modules/cjs/loader:901:27)    
    at Module.require (node:internal/modules/cjs/loader:1115:19) 
    at mod.require (C:\Users\mehdi\OneDrive\Bureau\dotUI\node_modules\.pnpm\n[email protected][email protected][email protected][email protected]\node_modules\next\dist\server\require-hook.js:65:28) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Node.js v20.9.0

Current vs. Expected behavior

The project should start correctly when running development server.

Provide environment information

Node.js 20.9
Next.js 15.0.3

Which area(s) are affected? (Select all that apply)

Content Sources (e.g. Fumadocs MDX, Content Collections)

Additional context

No response

@mehdibha mehdibha added the bug Something isn't working label Nov 15, 2024
@fuma-nama
Copy link
Owner

fuma-nama commented Nov 16, 2024

You can try to rename it to next.config.mts

I remember Next.js doesn't support mts extensions, causing ESM packages to have problems so you still need to use mjs. Not sure if it's supported now.

@fuma-nama fuma-nama added the wontfix This will not be worked on label Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants