Hello, since last Friday 10.02.2023, I am not able to build the app.
- Node version: 14 and 16
- Create React App
- Build command: cp .env.staging .env && CI=false npm run build
- Local building works fine
Error:
8:25:53 PM: Detected 1 framework(s)
8:25:53 PM: "create-react-app" at version "4.0.3"
8:25:53 PM: Installing missing commands
8:25:53 PM: Verify run directory
8:25:53 PM: Section completed: initializing
8:25:54 PM: β
8:25:54 PM: Netlify Build
8:25:54 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
8:25:54 PM: β
8:25:54 PM: β― Version
8:25:54 PM: @netlify/build 29.5.4
8:25:54 PM: β
8:25:54 PM: β― Flags
8:25:54 PM: baseRelDir: true
8:25:54 PM: buildId: 63e69a236f070f000845aa8d
8:25:54 PM: deployId: 63e69a236f070f000845aa8f
8:25:54 PM: β
8:25:54 PM: β― Current directory
8:25:54 PM: /opt/build/repo
8:25:54 PM: β
8:25:54 PM: β― Config file
8:25:54 PM: /opt/build/repo/netlify.toml
8:25:54 PM: β
8:25:54 PM: β― Context
8:25:54 PM: production
8:25:54 PM: β
8:25:54 PM: 1. Build command from Netlify app
8:25:54 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
8:25:54 PM: β
8:25:54 PM: $ cp .env.staging .env && CI=false npm run build
8:25:54 PM: > name@1.7.21 build /opt/build/repo
8:25:54 PM: > react-scripts build
8:25:55 PM: Creating an optimized production build...
8:28:32 PM: <--- Last few GCs --->
8:28:32 PM: [1401:0x5e54fb0] 156037 ms: Mark-sweep (reduce) 2030.1 (2051.0) -> 2029.0 (2052.7) MB, 656.1 / 0.0 ms (average mu = 0.222, current mu = 0.060) allocation failure scavenge might not succeed
8:28:32 PM: [1401:0x5e54fb0] 156722 ms: Mark-sweep (reduce) 2030.1 (2054.2) -> 2029.5 (2054.5) MB, 682.1 / 0.0 ms (average mu = 0.130, current mu = 0.004) allocation failure scavenge might not succeed
8:28:32 PM: <--- JS stacktrace --->
8:28:32 PM: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
8:28:32 PM: 1: 0xa3ac30 node::Abort() [/opt/buildhome/.nvm/versions/node/v14.21.2/bin/node]
8:28:32 PM: 2: 0x970199 node::FatalError(char const*, char const*) [/opt/buildhome/.nvm/versions/node/v14.21.2/bin/node]
8:28:32 PM: 3: 0xbba76e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/opt/buildhome/.nvm/versions/node/v14.21.2/bin/node]
8:28:32 PM: 4: 0xbbaae7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/opt/buildhome/.nvm/versions/node/v14.21.2/bin/node]
8:28:32 PM: 5: 0xd76d05 [/opt/buildhome/.nvm/versions/node/v14.21.2/bin/node]
8:28:32 PM: 6: 0xd7788f [/opt/buildhome/.nvm/versions/node/v14.21.2/bin/node]
8:28:32 PM: 7: 0xd856cb v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/opt/buildhome/.nvm/versions/node/v14.21.2/bin/node]
8:28:32 PM: 8: 0xd8928c v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/opt/buildhome/.nvm/versions/node/v14.21.2/bin/node]
8:28:32 PM: 9: 0xd5796b v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/opt/buildhome/.nvm/versions/node/v14.21.2/bin/node]
8:28:32 PM: 10: 0x109ffbf v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/opt/buildhome/.nvm/versions/node/v14.21.2/bin/node]
8:28:32 PM: 11: 0x14491d9 [/opt/buildhome/.nvm/versions/node/v14.21.2/bin/node]
8:28:33 PM: npm ERR! code ELIFECYCLE
8:28:33 PM: npm ERR! errno 1
8:28:33 PM: npm ERR! name@1.7.21 build: `react-scripts build`
8:28:33 PM: npm ERR! Exit status 1
8:28:33 PM: npm ERR!
8:28:33 PM: npm ERR! Failed at the name@1.7.21 build script.
8:28:33 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
8:28:33 PM: npm ERR! A complete log of this run can be found in:
8:28:33 PM: npm ERR! /opt/buildhome/.npm/_logs/2023-02-10T19_28_33_300Z-debug.log
8:28:33 PM: β
8:28:33 PM: "build.command" failed
8:28:33 PM: ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
8:28:33 PM: β
8:28:33 PM: Error message
8:28:33 PM: Command failed with exit code 1: cp .env.staging .env && CI=false npm run build (https://ntl.fyi/exit-code-1)
8:28:33 PM: β
8:28:33 PM: Error location
8:28:33 PM: In Build command from Netlify app:
8:28:33 PM: cp .env.staging .env && CI=false npm run build
8:28:33 PM: β
8:28:33 PM: Resolved config
8:28:33 PM: build:
8:28:33 PM: command: cp .env.staging .env && CI=false npm run build
8:28:33 PM: commandOrigin: ui
8:28:33 PM: publish: /opt/build/repo/build
8:28:33 PM: publishOrigin: ui
8:28:33 PM: redirects:
8:28:33 PM: - from: /*
status: 200
to: /index.html
redirectsOrigin: config
Caching artifacts