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 Cloudflare, Netlify. 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?
Here is my logs:
|2023-02-18T00:05:34.083269Z|Cloning repository...| |---|---| |2023-02-18T00:05:51.957223Z|From https://github.com/sdgqdgasgxtfdsd/i18nproject| |2023-02-18T00:05:51.957877Z| * branch 9a0d6ac8980ad8549e96418899be39d841775bfd -> FETCH_HEAD| |2023-02-18T00:05:51.958058Z|| |2023-02-18T00:05:52.256802Z|HEAD is now at 9a0d6ac Delete netlify.toml| |2023-02-18T00:05:52.257413Z|| |2023-02-18T00:05:52.41078Z|| |2023-02-18T00:05:52.437992Z|Success: Finished cloning repository files| |2023-02-18T00:05:53.174011Z|Installing dependencies| |2023-02-18T00:05:53.18572Z|Python version set to 2.7| |2023-02-18T00:05:56.558098Z|v12.18.0 is already installed.| |2023-02-18T00:05:57.7594Z|Now using node v12.18.0 (npm v6.14.4)| |2023-02-18T00:05:57.990124Z|Started restoring cached build plugins| |2023-02-18T00:05:58.005777Z|Finished restoring cached build plugins| |2023-02-18T00:05:58.490813Z|Attempting ruby version 2.7.1, read from environment| |2023-02-18T00:06:02.125257Z|Using ruby version 2.7.1| |2023-02-18T00:06:02.482274Z|Using PHP version 5.6| |2023-02-18T00:06:02.641397Z|5.2 is already installed.| |2023-02-18T00:06:02.670208Z|Using Swift version 5.2| |2023-02-18T00:06:02.670864Z|Started restoring cached node modules| |2023-02-18T00:06:02.686143Z|Finished restoring cached node modules| |2023-02-18T00:06:02.922763Z|Installing NPM modules using NPM version 6.14.4| |2023-02-18T00:06:03.870243Z|npm WARN read-shrinkwrap This version of npm is compatible with [email protected], but package-lock.json was generated for [email protected] I'll try to do my best with it!| |2023-02-18T00:06:26.750166Z|npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):| |2023-02-18T00:06:26.750552Z|npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {os:darwin,arch:any} (current: {os:linux,arch:x64})| |2023-02-18T00:06:26.751225Z|npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/[email protected] (node_modules/@next/swc-win32-x64-msvc):| |2023-02-18T00:06:26.751609Z|npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/[email protected]: wanted {os:win32,arch:x64} (current: {os:linux,arch:x64})| |2023-02-18T00:06:26.751854Z|npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/[email protected] (node_modules/@next/swc-win32-arm64-msvc):| |2023-02-18T00:06:26.752071Z|npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/[email protected]: wanted {os:win32,arch:arm64} (current: {os:linux,arch:x64})| |2023-02-18T00:06:26.752337Z|npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/[email protected] (node_modules/@next/swc-win32-ia32-msvc):| |2023-02-18T00:06:26.752577Z|npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/[email protected]: wanted {os:win32,arch:ia32} (current: {os:linux,arch:x64})| |2023-02-18T00:06:26.752774Z|npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/[email protected] (node_modules/@next/swc-linux-arm64-musl):| |2023-02-18T00:06:26.752963Z|npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/[email protected]: wanted {os:linux,arch:arm64} (current: {os:linux,arch:x64})| |2023-02-18T00:06:26.753139Z|npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/[email protected] (node_modules/@next/swc-linux-arm64-gnu):| |2023-02-18T00:06:26.753332Z|npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/[email protected]: wanted {os:linux,arch:arm64} (current: {os:linux,arch:x64})| |2023-02-18T00:06:26.753541Z|npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/swc-linux-a[email protected] (node_modules/@next/swc-linux-arm-gnueabihf):| |2023-02-18T00:06:26.753723Z|npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/[email protected]: wanted {os:linux,arch:arm} (current: {os:linux,arch:x64})| |2023-02-18T00:06:26.753933Z|npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/[email protected] (node_modules/@next/swc-freebsd-x64):| |2023-02-18T00:06:26.754246Z|npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/[email protected]: wanted {os:freebsd,arch:x64} (current: {os:linux,arch:x64})| |2023-02-18T00:06:26.754549Z|npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/[email protected] (node_modules/@next/swc-darwin-x64):| |2023-02-18T00:06:26.754858Z|npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/[email protected]: wanted {os:darwin,arch:x64} (current: {os:linux,arch:x64})| |2023-02-18T00:06:26.755043Z|npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/[email protected] (node_modules/@next/swc-darwin-arm64):| |2023-02-18T00:06:26.755174Z|npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/[email protected]: wanted {os:darwin,arch:arm64} (current: {os:linux,arch:x64})| |2023-02-18T00:06:26.755287Z|npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/[email protected] (node_modules/@next/swc-android-arm64):| |2023-02-18T00:06:26.755408Z|npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/[email protected]: wanted {os:android,arch:arm64} (current: {os:linux,arch:x64})| |2023-02-18T00:06:26.755534Z|npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @next/[email protected] (node_modules/@next/swc-android-arm-eabi):| |2023-02-18T00:06:26.755651Z|npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @next/[email protected]: wanted {os:android,arch:arm} (current: {os:linux,arch:x64})| |2023-02-18T00:06:26.755762Z|| |2023-02-18T00:06:26.755878Z|added 512 packages from 308 contributors and audited 524 packages in 22.923s| |2023-02-18T00:06:26.981728Z|| |2023-02-18T00:06:26.982117Z|110 packages are looking for funding| |2023-02-18T00:06:26.982375Z| run
npm fundfor details| |2023-02-18T00:06:26.982524Z|| |2023-02-18T00:06:26.982648Z|found 0 vulnerabilities| |2023-02-18T00:06:26.982771Z|| |2023-02-18T00:06:27.006583Z|NPM modules installed| |2023-02-18T00:06:27.414953Z|Installing Hugo 0.54.0| |2023-02-18T00:06:28.171987Z|Hugo Static Site Generator v0.54.0-B1A82C61A/extended linux/amd64 BuildDate: 2019-02-01T10:04:38Z| |2023-02-18T00:06:28.17628Z|Started restoring cached go cache| |2023-02-18T00:06:28.198035Z|Finished restoring cached go cache| |2023-02-18T00:06:28.354591Z|go version go1.14.4 linux/amd64| |2023-02-18T00:06:28.377781Z|go version go1.14.4 linux/amd64| |2023-02-18T00:06:28.381002Z|Installing missing commands| |2023-02-18T00:06:28.381301Z|Verify run directory| |2023-02-18T00:06:28.381507Z|Executing user command: npm run build| |2023-02-18T00:06:28.742195Z|| |2023-02-18T00:06:28.742552Z|> [email protected] build /opt/buildhome/repo| |2023-02-18T00:06:28.742722Z|> next build| |2023-02-18T00:06:28.74284Z|| |2023-02-18T00:06:28.857032Z|/opt/buildhome/repo/node_modules/next/dist/build/index.js:347| |2023-02-18T00:06:28.857407Z| ...pageKeys.app ?? [], | |2023-02-18T00:06:28.857615Z| ^| |2023-02-18T00:06:28.857796Z|| |2023-02-18T00:06:28.858011Z|SyntaxError: Unexpected token '?'| |2023-02-18T00:06:28.858165Z| at wrapSafe (internal/modules/cjs/loader.js:1054:16)| |2023-02-18T00:06:28.858315Z| at Module._compile (internal/modules/cjs/loader.js:1102:27)| |2023-02-18T00:06:28.85848Z| at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)| |2023-02-18T00:06:28.858626Z| at Module.load (internal/modules/cjs/loader.js:986:32)| |2023-02-18T00:06:28.858768Z| at Function.Module._load (internal/modules/cjs/loader.js:879:14)| |2023-02-18T00:06:28.85891Z| at Module.require (internal/modules/cjs/loader.js:1026:19)| |2023-02-18T00:06:28.859082Z| at require (internal/modules/cjs/helpers.js:72:18)| |2023-02-18T00:06:28.859227Z| at Object.<anonymous> (/opt/buildhome/repo/node_modules/next/dist/cli/next-build.js:10:37)| |2023-02-18T00:06:28.859343Z| at Module._compile (internal/modules/cjs/loader.js:1138:30)| |2023-02-18T00:06:28.859478Z| at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)| |2023-02-18T00:06:28.862642Z|npm ERR! code ELIFECYCLE| |2023-02-18T00:06:28.862847Z|npm ERR! errno 1| |2023-02-18T00:06:28.863805Z|npm ERR! [email protected] build:
next build| |2023-02-18T00:06:28.864032Z|npm ERR! Exit status 1| |2023-02-18T00:06:28.864164Z|npm ERR! | |2023-02-18T00:06:28.864285Z|npm ERR! Failed at the [email protected] build script.| |2023-02-18T00:06:28.86442Z|npm ERR! This is probably not a problem with npm. There is likely additional logging output above.| |2023-02-18T00:06:28.870184Z|| |2023-02-18T00:06:28.870445Z|npm ERR! A complete log of this run can be found in:| |2023-02-18T00:06:28.870597Z|npm ERR! /opt/buildhome/.npm/_logs/2023-02-18T00_06_28_864Z-debug.log| |2023-02-18T00:06:28.879427Z|Failed: build command exited with code: 1| |2023-02-18T00:06:29.819785Z|Failed: an internal error occurred|