vite build –out-dir build
The CJS build of Vite’s Node API is deprecated. See
https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated
for more details. vite v5.2.13 building for production…
transforming…✓ 5152 modules transformed. rendering chunks…
/codebuild/output/tmp/script.sh: line 4: 178 Killed
npm run build [Container] 2024/06/26 11:34:48.511277 Command did not
exit successfully npm run build exit status 137 [Container] 2024/06/26
11:34:48.574011 Phase complete: BUILD State: FAILED [Container]
2024/06/26 11:34:48.574038 Phase context status code:
COMMAND_EXECUTION_ERROR Message: Error while executing command: npm
run build. Reason: exit status 137
I have tried to increase the memory size using NODE_OPTIONS=’–max-old-space-size=2048′.
when i try to build it local I am not getting any error, when I build in AWS I am getting the above error.
this is my vite.config for build
build: {
chunkSizeWarningLimit: 40000,
//minify: false,
sourcemap: true,
rollupOptions: {
onLog(level, log, handler) {
if (log.cause && log.cause.message === `Can't resolve original location of error.`) {
return;
}
handler(level, log);
},
},
},