Next JS i18n Deployment Problem

Hello. For a few days, I was having trouble deploying my Next JS project that I was localizing with i18n. Until yesterday. Yesterday I was able to publish my project on Vercel (though I’m not quite sure how I did it). But I want to be able to publish my project in places like Netlify, Cloudflare. Any ideas on what I should do about this?

As far as I know, Next JS does not support exporting projects containing i18n. However, my project is still able to be published in Vercel. What is the reason I can do this in Vercel but not in other places? What should I do?

3:09:19 AM: {
3:09:19 AM:   runtimeError: {
3:09:19 AM:     code: 'ERRORED_DOCUMENT_REQUEST',
3:09:19 AM:     message: 'Lighthouse was unable to reliably load the page you requested. Make sure you are testing the correct URL and that the server is properly responding to all requests. (Status code: 404)'
3:09:19 AM:   }
3:09:19 AM: }
3:09:19 AM: Report collected: audited_uri: 'out/', html_report_size: 314.9 KiB
3:09:19 AM: ​
3:09:19 AM: (@netlify/plugin-lighthouse onPostBuild completed in 5.8s)
3:09:19 AM: ​
3:09:19 AM:   5. @netlify/plugin-nextjs (onPostBuild event)                 
3:09:19 AM: ────────────────────────────────────────────────────────────────
3:09:19 AM: ​
3:09:19 AM: Next.js cache saved.
3:09:19 AM: ​
3:09:19 AM: (@netlify/plugin-nextjs onPostBuild completed in 209ms)
3:09:19 AM: ​
3:09:19 AM:   6. Deploy site                                                
3:09:19 AM: ────────────────────────────────────────────────────────────────
3:09:19 AM: ​
3:09:19 AM: Section completed: deploying
3:09:19 AM: ​
3:09:19 AM:   Configuration error                                           
3:09:19 AM: ────────────────────────────────────────────────────────────────
3:09:19 AM: ​
3:09:19 AM:   Error message
3:09:19 AM:   Deploy did not succeed: Deploy directory 'out' does not exist
3:09:19 AM: ​
3:09:19 AM:   Resolved config
3:09:19 AM:   build:
3:09:19 AM:     command: npm run build
3:09:19 AM:     commandOrigin: ui
3:09:19 AM:     environment:
3:09:19 AM:       - NETLIFY_NEXT_PLUGIN_SKIP
3:09:19 AM:     publish: /opt/build/repo/out
3:09:19 AM:     publishOrigin: ui
3:09:19 AM:   plugins:
3:09:19 AM:     - inputs: {}
3:09:19 AM:       origin: ui
3:09:19 AM:       package: '@netlify/plugin-lighthouse'
3:09:19 AM:     - inputs: {}
3:09:19 AM:       origin: ui
3:09:19 AM:       package: '@netlify/plugin-nextjs'
3:09:20 AM: Caching artifacts
3:09:20 AM: Started saving node modules
3:09:20 AM: Finished saving node modules
3:09:20 AM: Started saving build plugins
3:09:20 AM: Finished saving build plugins
3:09:20 AM: Started saving corepack cache
3:09:20 AM: Finished saving corepack cache
3:09:20 AM: Started saving pip cache
3:09:20 AM: Finished saving pip cache
3:09:20 AM: Started saving emacs cask dependencies
3:09:20 AM: Finished saving emacs cask dependencies
3:09:20 AM: Started saving maven dependencies
3:09:20 AM: Finished saving maven dependencies
3:09:20 AM: Started saving boot dependencies
3:09:20 AM: Finished saving boot dependencies
3:09:20 AM: Started saving rust rustup cache
3:09:20 AM: Finished saving rust rustup cache
3:09:20 AM: Started saving go dependencies
3:09:20 AM: Finished saving go dependencies
3:09:20 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
3:09:20 AM: Failing build: Failed to build site
3:09:20 AM: Finished processing build request in 50.286s

Are you sure you’re using `next export on Vercel?

Anyways, this error mentions your publish directory doesn’t exist. I’d suggest you to change the publish directory to .next, but since you’re using next export (as you mention), I’m feeling this is intentional.