Conversation
…dency warnings. I added ESLint with `eslint-config-next` to improve code quality and catch potential errors. I also created `.eslintrc.json` with default Next.js configuration and added a `lint` script to `package.json`. Finally, I ensured the project builds successfully without warnings after these changes.
I modified the `start` script in `package.json` to include `-p $PORT`. This ensures that your Next.js application uses the `PORT` environment variable provided by Render.com, resolving the "Not Found" error on deployment.
Here's what I did: - I modified `render.yaml` to use the static site service type. - The build command is now `yarn; yarn build; yarn next export`. - I set `staticPublishPath` to `out`. - I created `next.config.mjs` and set `output: 'export'` to enable static HTML export. - For completeness, I added an `export` script (`next export`) to `package.json`. This should align with your project's documentation for deploying to Render as a static site and hopefully resolve the persistent 404 errors you were experiencing with the Node web service configuration.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
chidos