Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
Dynamic Routes in Symlinks is not working | GoodFirstPicks

Dynamic Routes in Symlinks is not working

vercel/next.js 10 comments 1mo ago
View on GitHub
mediumopenScope: somewhat clearSkill match: maybeNext.jsTypeScriptReact

Why this is a good first issue

Dynamic routes via symlinks are broken across multiple Next.js versions.

AI Summary

Dynamic routes accessed through symlinks return 404 errors, while static routes work fine. The issue persists across multiple Next.js versions and requires investigation into how symlinks are handled in the routing system. A potential fix exists in a PR, but it's unclear if it fully resolves the issue.

Issue Description

Bug report

Describe the bug

Dynamic Routes in symlinks is not working

To Reproduce

I don't think github repos support symlink commits so this is how you can reproduce this:

In project folder:

mkdir pages/nolink
echo "export default function Post() {return <div>Works</div>}" > "pages/nolink/[id].js"
echo "export default function index() {return <div>Works</div>}" > "pages/nolink/index.js"
ln -s nolink pages/symlinktest
  • http://localhost:3000/symlinktest/123 shows "404 This page could not be found."
  • http://localhost:3000/symlinktest/ shows "works"
  • http://localhost:3000/nolink/123 shows "works"
  • http://localhost:3000/nolink/ shows "works"

Expected behavior

  • http://localhost:3000/symlinktest/123 should show "works"

System information

  • OS: Linux
  • Version of Next.js: ^9.5.2
  • Version of Node.js: v12.18.2

Additional context

I also tried this in next.config.js:

module.exports = {
    webpack: (config, { buildId, dev }) => {
      config.resolve.symlinks = false
      return config
    },
  }

index.js is for debug the error. Removing index.js did not help. This points to Dynamic Routes not supporting symlinks.

GitHub Labels

good first issueLinking and Navigating

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 10 points when you complete it!

Risk Flags

  • potential regression
  • filesystem handling
Loading labels...

Details

Points10 pts
Difficultymedium
Scopesomewhat clear
Skill Matchmaybe
Test Focusedno