Public folder is not accessible when the project has basePath

Hello Netlify team!
My project on Next.js and Netlify has a basePath and also has a sitemap in the public folder. When I test it on deploy-preview, everything is fine and I can check my sitemap. But when I deploy it in production, my sitemap shows 404 error.
I’ve already downloaded deploy folder and there is sitemap here.

As for next.config.js there is basePath also:
basePath: "basePath",

What do I have to do to make sitemap accessible on production?

Could we please have a URL to check @alisakova?

@hrishikesh is it possible to share it privately?

You can share it with me via direct message.

Hey @alisakova,

I’m seeing this logged in your published deploy at the moment:

Did you try changing (removing) that?

@hrishikesh I tried this before and this broke everything, because requests for assets and js files shows 404 errors. And only on production, previews are fine
I wrote these redirects according to this [Bug]: 404 on JS and CSS files · Issue #990 · netlify/next-runtime · GitHub

Hey there, @alisakova :wave:

Can you please send a link to the deploy that is not working? Looking in your deploy logs for production, we cannot seem to find this issue. This will help us look into this further.

Hey there, @alisakova :wave:

Sorry about the delay, I was offline when you sent me that DM with information. I have shared it with my team and we will continue to look into this.

Hi, @alisakova. I have created a support ticket to troubleshoot this privately as this site is on a team plan which includes private helpdesk support.

We should have already sent you an email about this in regards to support ticket # 90706. Please reply to that email to continue troubleshooting. However, please do reply here if you do not see that email and we’ll resend it.

1 Like