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

Extra character / added in path once app deployed #5955

Closed
dbrrt opened this issue Dec 28, 2018 · 6 comments · Fixed by #6752
Closed

Extra character / added in path once app deployed #5955

dbrrt opened this issue Dec 28, 2018 · 6 comments · Fixed by #6752

Comments

@dbrrt
Copy link

dbrrt commented Dec 28, 2018

Bug report

Describe the bug

When I'm deploying a nextjs app, I've got the character / appended at the end of the path, which is not appearing during development.

To Reproduce

  1. in pages folder, create a component (such as home.js)
  2. In development, path will be /home if following structure pages/home.js
  3. Once deployed (e.g. : netlify), path will be /home/

System information

  • OS: macOS 10.13
  • Browser: chrome
  • Version of Next.js: 7.0.2
@timneutkens
Copy link
Member

timneutkens commented Dec 28, 2018

Duplicate of #5214

As per the current code this is expected behavior because of https://github.com/zeit/next.js/blob/canary/packages/next-server/lib/router/router.js#L48

Once #5927 lands we can add a build target for exporting with the option to enable/disable this behavior.

@timneutkens timneutkens marked this as a duplicate of #5214 Dec 28, 2018
@dbrrt
Copy link
Author

dbrrt commented Dec 28, 2018

Sounds great. Would be awesome to get such a feature.

@c0b41
Copy link
Contributor

c0b41 commented Dec 31, 2018

@dbrrt do you using Netlify Pretty Urls ? maybe problem this

@dbrrt
Copy link
Author

dbrrt commented Jan 2, 2019

@c0b41 No, I'm not using any asset optimization.
I think the solution is there : https://github.com/zeit/next.js/blob/canary/packages/next-server/lib/router/router.js#L56

@martpie
Copy link
Contributor

martpie commented Feb 22, 2019

When using Caddy web server to serve an exported next website, you get the same problems.

Nuxt.js solved it by providing an option for how index.html look like after a static export https://nuxtjs.org/api/configuration-generate#subfolders

@dbrrt
Copy link
Author

dbrrt commented Apr 23, 2019

Thanks !

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants