-
Notifications
You must be signed in to change notification settings - Fork 121
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
Problem using deployed server-function from open-next when using basePath #476
Comments
This is not done on the server function in OpenNext. |
Im with the same issue :/ |
@jarodsim What issue ?? This is not meant to be done in OpenNext but by the IAC. |
Oh, sorry I'll take a look at SST, thanks |
No problem, just use the behavior defined in the |
Hi @conico974, thanks for replying. I took a look at the
Would you happen to know if there's any examples of deploying the open-next server-functions to lambda with basePath working? |
Doesn't work when invoked via cloudfront either. https://cloudfront.net/basePath/index returns 404. I have deployed open-next webs without baseUrl and it works fine, that's why i suspect its a basePath handling issue. I am using OpenNext v3.0.6.
Ok, will try that and report back, thanks for the suggestions! |
Just chiming in since I'm facing the exact same issue. Using OpenNext 3.0.8 via SST ion. Not related to using server functions, but rather: Can confirm that pinning |
Hey, thanks @eschaefer, after reading your comment, i also fixed my open-next version to 3.0.2 and the issue is fixed. |
Does anyone use the basePath configuration in their next.config.js?
I am migrating to use open-next for deployment from using serverless-nextjs and facing an issue after deploying the server function onto Lambda.
For example, in my next.config.js i have a
basePath: "/basePath",
and a page namedindex
When i deploy the open-next server function onto a lambda url function and try to access the page with the basePath https://example.lambda-url.ap-southeast-1.on.aws/basePath/index, it returns me 404.
however accessing https://example.lambda-url.ap-southeast-1.on.aws/index routes properly.
Looking at how the serverless-nextjs library did it, they have a function to slice away the basePath in the lambda function handler: https://github.com/serverless-nextjs/serverless-next.js/blob/e6367b585fb98608cd2e9327e2c8d4058ba73b00/packages/libs/core/src/route/basepath.ts
Have i misconfigured something on my open-next setup?
The text was updated successfully, but these errors were encountered: