I am getting 404 error after successfully deploying the NextJs App. PLEASE HELP ME OUT!
What are the build settings you are using for the site?
Can you share a clickable URL for the site?
these are the build settings
here is my url : https://master--imaginative-cassata-9b4673.netlify.app/
The page that is displayed is the boilerplate page which is why it contains this HTML comment
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
If I type a random path like https://imaginative-cassata-9b4673.netlify.app/jlasd
a 404 page loads.
Do you have a basePath
set in the next.config.js
?
/** @type {import(‘next’).NextConfig} */
const nextConfig = {
reactStrictMode: true,
}
module.exports
this is what my next.config.js file is
Can you share the repository?
actually I can’t. its someone else’s project. I hope you understand but just tell me what are the possible reasons?
I’m unable to provide anything further without seeing the code.
Others may have more insights based in the information currently available.
Hi there,
Did you see this guide yet? This is the best place to start for “Page Not Found” issues.
If you are still seeing issues after following the troubleshooting steps in there, please check out this Support Guide as well. It outlines all of our build and deploy resources and will get you on the right track
If none of the above resources help, please write back with your site name and what steps you have tried and we can look into this further!
Hi @gmdahri.
If the project files are in a sub-directory in the project root, then you need to set that folder as your base directory.
Thanks.