question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Root page with basePath doesn't work without trailingSlash

See original GitHub issue

Describe the bug

I see one problem after deploy, I have a basePath “test/dwa” and app returns 404 on:

https://d1g4p9lwi1bqdw.cloudfront.net/test/dwa

But it works on: https://d1g4p9lwi1bqdw.cloudfront.net/test/dwa/

I have trailingSlash:false in next.js config.

sls-next/lambda-at-edge@1.6.0-alpha.5

Expected behavior Root url with subPath should work with and without trailingSlash

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
marcin-piela-sfcommented, Aug 28, 2020

Sorry I wrote “subPath” but I meant “basePath” in next.config.js:

  basePath: '/test/dwa',
0reactions
marcin-piela-sfcommented, Aug 29, 2020

Great! Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dev server does not apply base path correctly #2958 - GitHub
If I set kit.paths.base as stated in the documentation, the first page load works correctly but the import statements are relative to the...
Read more >
How to obtain a path without using Link when basePath is set ...
I have a simple page in a Next.js project, under pages folder. import Link from 'next/link'; import ...
Read more >
Base Path - next.config.js
basePath allows you to set a path prefix for the application. For example, to use /docs instead of / (the default), open next.config.js...
Read more >
Next.js and GitHub Pages, how the basePath and assetPrefix ...
js project on GitHub Pages (without a custom domain name) your internal links won't work as your project will be hosted on a...
Read more >
Host and deploy ASP.NET Core Blazor | Microsoft Learn
The app base path is the app's root URL path. Consider the following ASP. ... dotnet run --pathbase=/{RELATIVE URL PATH (no trailing slash)}....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found