I'm trying to run a build of an Angular template app I bought. I have setup the pipeline as follows:
image: gabrielaraujof/angular-cli
pipelines:
default:
- step:
script:
- npm install
- ng build --prod
- tar -zcvf package.tar.gz dist/
- curl -X POST --user "${BB_AUTH_STRING}" "https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}/downloads" --form files=@package.tar.gzNow this actually works fine.
However when I add the (for me required) `--prod` flag the process ends with some "Javascript heap out of memory" exception (see below for full trace).
Now I haven't changed any parts of the template yet. Does this mean Bitbucket Pipelines cannot build this project or should I keep trying until there is enough memory?
(i only have 9 build minutes left from the trial as this last failed build took over 19 minutes..)
<span>Node#moveTo was deprecated. Use Container#append.</span><span>FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory</span><span><--- Last few GCs ---></span><span> 1005609 ms: Mark-sweep 1242.3 (1436.1) -> 1240.0 (1436.1) MB, 1286.9 <a href="https://bitbucket.org/ykgh/fuse-bootstrap5/src/17cb804cd15bdaed968b51eed546d8613d6d9be4//" target="_blank" rel="noopener noreferrer">/</a> 0.0 ms [allocation failure] [GC in old space requested].</span><span> 1006856 ms: Mark-sweep 1240.0 (1436.1) -> 1240.0 (1436.1) MB, 1246.2 <a href="https://bitbucket.org/ykgh/fuse-bootstrap5/src/17cb804cd15bdaed968b51eed546d8613d6d9be4//" target="_blank" rel="noopener noreferrer">/</a> 0.0 ms [allocation failure] [GC in old space requested].</span><span> 1008173 ms: Mark-sweep 1240.0 (1436.1) -> 1243.9 (1405.1) MB, 1316.9 <a href="https://bitbucket.org/ykgh/fuse-bootstrap5/src/17cb804cd15bdaed968b51eed546d8613d6d9be4//" target="_blank" rel="noopener noreferrer">/</a> 0.0 ms [last resort gc].</span><span> 1009519 ms: Mark-sweep 1243.9 (1405.1) -> 1247.4 (1405.1) MB, 1345.7 <a href="https://bitbucket.org/ykgh/fuse-bootstrap5/src/17cb804cd15bdaed968b51eed546d8613d6d9be4//" target="_blank" rel="noopener noreferrer">/</a> 0.0 ms [last resort gc].</span><span><--- JS stacktrace ---></span><span>==== JS stack trace =========================================</span><span>Security context: 0x3d2ff4dcfb39 <JS Object></span><span> 2: optimize [0x3d2ff4d04381 <undefined>:7677] [pc=0x5fb70f6fef4] (this=0x122106af21e1 <an AST_Binary with map 0x148311e48989>,compressor=0x29f327c5ccc1 <a Compressor with map 0x32d0952754e1>)</span><span> 3: before [0x3d2ff4d04381 <undefined>:~7640] [pc=0x5fb70e087fa] (this=0x29f327c5ccc1 <a Compressor with map 0x32d0952754e1>,node=0x122106af21e1 <an AST_Binary with map 0x148311e48989>,descend=0x3f6...</span><span> 1: node::Abort() [@angular/cli]</span><span> 2: 0x109bf8c [@angular/cli]</span><span> 3: v8::Utils::ReportApiFailure(char const*, char const*) [@angular/cli]</span><span> 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [@angular/cli]</span><span> 5: v8::internal::Factory::NewCode(v8::internal::CodeDesc const&, unsigned int, v8::internal::Handle<v8::internal::Object>, bool, bool, int, bool) [@angular/cli]</span><span> 6: v8::internal::CodeGenerator::MakeCodeEpilogue(v8::internal::MacroAssembler*, v8::internal::CompilationInfo*) [@angular/cli]</span><span> 7: v8::internal::FullCodeGenerator::MakeCode(v8::internal::CompilationInfo*) [@angular/cli]</span><span> 8: 0xb4c51e [@angular/cli]</span><span> 9: 0xb4e900 [@angular/cli]</span><span>10: 0xb55fc6 [@angular/cli]</span><span>11: v8::internal::Compiler::Compile(v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Compiler::ClearExceptionFlag) [@angular/cli]</span><span>12: v8::internal::Runtime_CompileLazy(int, v8::internal::Object**, v8::internal::Isolate*) [@angular/cli]</span><span>13: 0x5fb59e092a7</span><span>+ ng build --prod</span>