vercel / next.js

The React Framework
https://nextjs.org
MIT License
125.1k stars 26.72k forks source link

Link does not target named anchor. #61128

Open Nerdman4U opened 7 months ago

Nerdman4U commented 7 months ago

Link to the code that reproduces this issue

https://github.com/Nerdman4U/taxomageia-frontend

To Reproduce

  1. export Link with #name

Current vs. Expected behavior

  1. url has previous name i.e. example.com/page.html#previous
  2. console has error: page.html.txt not found

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023
Binaries:
  Node: 18.18.0
  npm: 10.2.5
  Yarn: 1.22.21
  pnpm: N/A
Relevant Packages:
  next: 14.0.4
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.3.3
Next.js Config:
  output: export

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

Not sure

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

next dev (local)

Additional context

I changed elements to anchors and it works without error message.

I can deliver a webpage url for examination if you like.

Nerdman4U commented 7 months ago

Current behavior:
1) URL has previous name i.e. example.com/page.html#previous (does not work) 2) Console has error: page.html.txt not found

Expected behavior: 1) Link works, URL has correct name i.e. example.com/page.html#correct 2) No error messages

Related to #44295

devmanbud commented 7 months ago

can you assign this to me?

Nerdman4U commented 7 months ago

More info how to reproduce:

This is my next.config.js:

/* @type {import('next').NextConfig} / const nextConfig = { output: "export", images: { unoptimized: true }, async rewrites() { return [ { source: '/api/:path', destination: `http://localhost:3030/api/:path, }, { source: '/app', destination:http://localhost:3030/app`, }, ] },}

module.exports = nextConfig

If you need more info, just ask. I can also try to help if you like. I have also external website where problem occurs (staging server).

Nerdman4U commented 7 months ago

can you assign this to me?

Sure! But how? Selection is not available at right hand panel.