Hey there,
Having an issue where my build is claiming there is no index.html in the serverless/pages directory, which is correct. I believe that because of the multi-lang set-up I am running, an index.js is being created instead which swaps between en.html and fr.html.
Domain: quartexxmanagement.netlify.app
Error log:
Plugin “@netlify/plugin-nextjs” internal error
Error: ENOENT: no such file or directory, stat '.next/serverless/pages/index.html'
In "onBuild" event in "@netlify/plugin-nextjs" from Netlify app
at Object.statSync (fs.js:933:3)
at Object.statSync (/opt/build/repo/.netlify/plugins/node_modules/graceful-fs/polyfills.js:307:34)
at statSync (/opt/build/repo/.netlify/plugins/node_modules/fs-extra/lib/util/stat.js:10:52)
at getStatsSync (/opt/build/repo/.netlify/plugins/node_modules/fs-extra/lib/util/stat.js:24:19)
at Object.checkPathsSync (/opt/build/repo/.netlify/plugins/node_modules/fs-extra/lib/util/stat.js:49:33)
at copySync (/opt/build/repo/.netlify/plugins/node_modules/fs-extra/lib/copy-sync/copy-sync.js:24:38)
at setupStaticFileForPage (/opt/build/repo/.netlify/plugins/node_modules/next-on-netlify/lib/helpers/setupStaticFileForPage.js:15:3)
at /opt/build/repo/.netlify/plugins/node_modules/next-on-netlify/lib/pages/getStaticProps/setup.js:27:5
at Array.forEach ()
at setup (/opt/build/repo/.netlify/plugins/node_modules/next-on-netlify/lib/pages/getStaticProps/setup.js:22:9)
Error properties:
{
errno: -2,
syscall: 'stat',
code: 'ENOENT',
path: '.next/serverless/pages/index.html'
}