- Check
package.json
:- Ensure
@netlify/plugin-nextjs
is listed under"dependencies"
. - Confirm the version (
^5.9.4
) is compatible with the installed Next.js version (^13.4.24
).
- Ensure
- Review
netlify.toml
:- Confirm the plugin is correctly configured:
[[plugins]] package = "@netlify/plugin-nextjs"
- Ensure there are no conflicting plugins that might interfere with the Next.js plugin.
- Confirm the plugin is correctly configured:
- Local Build Test:
- Run
npm run build
locally to ensure the build completes without errors. - Verify that the
.netlify/functions
directory is populated after the build.
- Run
- Netlify Build Logs:
- Access the Netlify dashboard.
- Navigate to the specific site deployment logs.
- Look for any errors or warnings related to the build process or plugin execution.
- Expected Contents:
- After a successful build, the
.netlify/functions
directory should contain thenextjs-server
function files.
- After a successful build, the
- Current Observation:
- Only
.gitkeep
is present, indicating that functions were not generated.
- Only
- Action:
- Ensure that the build process is not skipping function generation.
- Verify that no errors during the build are preventing function creation.
- External Packages:
- The configuration includes
serverExternalPackages: ['@solana/web3.js']
. - Confirm that external packages are not conflicting with Netlify's build process.
- The configuration includes
- Webpack Configuration:
- Ensure that custom webpack settings are compatible with Netlify's serverless functions.
- Specifically, review the
externals
added in the webpack configuration.
- Required Variables:
SOLANA_RPC_URL
OPENSVM_RPC_LIST
OPENSVM_RPC_LIST_2
NEXT_USE_NETLIFY_EDGE
NODE_VERSION
NEXT_TELEMETRY_DISABLED
NEXT_PRIVATE_TARGET
- Action:
- Ensure all environment variables are correctly set in the Netlify dashboard.
- Verify that there are no typos or missing variables that the build depends on.
- Action:
- Run
npm install
to ensure all dependencies are up-to-date. - Consider deleting
node_modules
and reinstalling to eliminate potential corruptions:rm -rf node_modules npm install
- Run
- Action:
- Trigger a fresh deployment on Netlify after ensuring all configurations and dependencies are correct.
- Monitor the build process for any errors or warnings.
- Action:
- Once deployment is complete, access
https://opensvm.com
to check if the 404 error persists. - Use
curl
or a browser to verify the site's accessibility.
- Once deployment is complete, access
- Action:
- If the issue persists, enable more verbose logging in Netlify to gather detailed insights.
- Modify the build command to include debug flags if supported.
- Action:
- If all else fails, refer to Netlify's official documentation for deploying Next.js applications.
- Consider reaching out to Netlify support for assistance with persistent deployment issues.