next 14 build issue with aws amplify deployment
Unanswered
Gray Vireo posted this in #help-forum
Gray VireoOP
Im getting this error on the derployment is aws amplify when the frontend build is running. I my previous next.js aws apps i never had this issue . it state something about my headers are not defined... any idea on what i need to do ?
2023-10-27T13:13:28.360Z [WARNING]: unhandledRejection ReferenceError: Headers is not defined
at /codebuild/output/src3148394415/src/applicationManagement/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:14:8846
at /codebuild/output/src3148394415/src/applicationManagement/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:14:41308
at Object.<anonymous> (/codebuild/output/src3148394415/src/applicationManagement/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:14:41329)
at Module._compile (node:internal/modules/cjs/loader:1165:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
at Module.load (node:internal/modules/cjs/loader:1043:32)
at Function.Module._load (node:internal/modules/cjs/loader:878:12)
at Module.require (node:internal/modules/cjs/loader:1067:19)
at Module.mod.require (/codebuild/output/src3148394415/src/applicationManagement/node_modules/next/dist/server/require-hook.js:64:28)
at require (node:internal/modules/cjs/helpers:103:18)
2023-10-27T13:13:28.370Z [ERROR]: !!! Build failed
2023-10-27T13:13:28.360Z [WARNING]: unhandledRejection ReferenceError: Headers is not defined
at /codebuild/output/src3148394415/src/applicationManagement/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:14:8846
at /codebuild/output/src3148394415/src/applicationManagement/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:14:41308
at Object.<anonymous> (/codebuild/output/src3148394415/src/applicationManagement/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js:14:41329)
at Module._compile (node:internal/modules/cjs/loader:1165:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1219:10)
at Module.load (node:internal/modules/cjs/loader:1043:32)
at Function.Module._load (node:internal/modules/cjs/loader:878:12)
at Module.require (node:internal/modules/cjs/loader:1067:19)
at Module.mod.require (/codebuild/output/src3148394415/src/applicationManagement/node_modules/next/dist/server/require-hook.js:64:28)
at require (node:internal/modules/cjs/helpers:103:18)
2023-10-27T13:13:28.370Z [ERROR]: !!! Build failed