-
Notifications
You must be signed in to change notification settings - Fork 86
[Bug]: trailingSlash: true working locally but not on Netlify #1788
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
Comments
Any update on this? |
Hi @thomasryu. This should be working. We have tests for it. Here's the config for one of our test sites with it enabled. https://github.com/netlify/next-runtime/blob/main/demos/default/next.config.js#L42 If you've installed the Netlify Next runtime explicitly in your pacakge.json, upgrade to the latest. Otherwise, if you deploy it should pick up the latest Netlify Next runtime. |
Hey @nickytonline, I really don't know what to say, I've further trimmed my linked GitHub project down to see if I can pinpoint the problem, but it just doesn't seem work. Right now, my config file is literally just the trailingSlash: true option. And after the cleanup, Netlify is even going on the opposite direction and stripping the trailing slash away (e.g.: https://spiffy-sundae-34f3ed.netlify.app/about/). For reference, I've ran built this same barebones project locally and uploaded it to Vercel and both works as intended :/ |
We are also experiencing the same issue as @thomasryu. |
Same issue for me. Was anyone able to solve it? |
Closing as duplicate #998 |
Summary
I am using a combination of TypeScript and NextJs and the
trailingSlash: true
option is not working on Netlify, with neither Pretty URLs enabled or not.I've looked at the other related issues, currently opened, solved or closed, but none of the listed solutions work.
A simple example can be found here
Steps to reproduce
A link to a reproduction repository
https://github.com/thomasryu/nextjs-test
Next Runtime version
4.29.1
More information about your build
netlify.toml
)What OS are you using?
No response
Your netlify.toml file
`netlify.toml`
Your public/_redirects file
`_redirects`
# Paste content of your `_redirects` file here
Your
next.config.js
file`next.config.js`
module.exports = { trailingSlash: true, }
Builds logs (or link to your logs)
Build logs
Function logs
Function logs
.next JSON files
generated .next JSON files
The text was updated successfully, but these errors were encountered: