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

Cannot generate static assets with non-latin names #50688

Closed
1 task done
akayavanade opened this issue Jun 2, 2023 · 3 comments
Closed
1 task done

Cannot generate static assets with non-latin names #50688

akayavanade opened this issue Jun 2, 2023 · 3 comments
Labels
bug Issue was opened via the bug report template. stale The issue has not seen recent activity.

Comments

@akayavanade
Copy link

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

> next info


    Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Pro   
    Binaries:
      Node: 18.12.1
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant packages:
      next: 12.3.4
      eslint-config-next: 11.1.4
      react: 17.0.2
      react-dom: 17.0.2

Which area(s) of Next.js are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue or a replay of the bug

npm run build

To Reproduce

If you have page urls with non-latin characters (arabic, russian, hindi, korean, etc.), nextjs fails the build because it cannot save these files in .next folder.

Describe the Bug

We have pages with non-latin characters in URL. For example:
/home/حقائق-سريعة-قضايا-صحَّة-المرأة/مُضَاعَفاتُ-المَخاضِ-والوِلادة/الولادة-القيصريَّة-c-section

When we build the app, nextjs got correct static paths, got correct data from the server to render page, but when it saves html/json file it escapes non-latin characters and hit the file system name length limit.

Error occurred prerendering page "/ar/home/%D8%AD%D9%82%D8%A7%D8%A6%D9%82-%D8%B3%D8%B1%D9%8A%D8%B9%D8%A9-%D9%82%D8%B6%D8%A7%D9%8A%D8%A7-%D8%B5%D8%AD%D9%91%D9%8E%D8%A9-%D8%A7%D9%84%D9%85%D8%B1%D8%A3%D8%A9/%D8%A7%D9%84%D8%B9%D9%8E%D8%AF%D9%88%D9%89-%D8%A7%D9%84%D9%85%D9%87%D8%A8%D9%84%D9%8A%D9%91%D9%8E%D8%A9-%D9%88%D8%A7%D9%84%D8%AF%D9%91%D9%8E%D8%A7%D8%A1-%D8%A7%D9%84%D8%A7%D9%84%D8%AA%D9%90%D9%87%D8%A7%D8%A8%D9%8A%D9%91-%D8%A7%D9%84%D8%AD%D9%88%D8%B6%D9%8A%D9%91/%D8%A7%D9%84%D8%AA%D9%87%D8%A7%D8%A8-%D8%A7%D9%84%D9%81%D8%B1%D8%AC". Read more: https://nextjs.org/docs/messages/prerender-error Error: ENAMETOOLONG: name too long, mkdir

Expected Behavior

We expect nextjs save html/json with the same name as in url without escaping.
For example:

static path url: /حقائق-سريعة-قضايا-صحَّة-المرأة/مُضَاعَفاتُ-المَخاضِ-والوِلادة/الولادة-القيصريَّة
static file/folder name should follow the same naming without escaping it.

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

@akayavanade akayavanade added the bug Issue was opened via the bug report template. label Jun 2, 2023
@HamAndRock
Copy link

Might be related to this: #50055

@nextjs-bot
Copy link
Collaborator

This issue has been automatically marked as stale due to two years of inactivity. It will be closed in 7 days unless there’s further input. If you believe this issue is still relevant, please leave a comment or provide updated details. Thank you.

@nextjs-bot nextjs-bot added the stale The issue has not seen recent activity. label Feb 16, 2025
@nextjs-bot
Copy link
Collaborator

This issue has been automatically closed due to two years of inactivity. If you’re still experiencing a similar problem or have additional details to share, please open a new issue following our current issue template. Your updated report helps us investigate and address concerns more efficiently. Thank you for your understanding!

@nextjs-bot nextjs-bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. stale The issue has not seen recent activity.
Projects
None yet
Development

No branches or pull requests

3 participants