Im trying to put my ReactJS Github repo on AzureDevOps, I tried the answers of mostly similar questions here, but I cant resolve this error
The error is:
Fasto@0.1.0 build /home/vsts/work/1/s react-scripts build
Creating an optimized production build... Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db
Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
<--- Last few GCs --->
[2051:0x3641880] 149437 ms: Mark-sweep 1338.9 (1427.1) -> 1338.9 (1412.1) MB, 1200.7 / 0.0 ms (average mu = 0.204, current mu = 0.000) last resort GC in old space requested [2051:0x3641880] 150646 ms: Mark-sweep 1338.9 (1412.1) -> 1338.9 (1412.1) MB, 1208.8 / 0.0 ms (average mu = 0.111, current mu = 0.000) last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0x262669b5bf1d] Security context: 0x1365b0c1e6c1 <JSObject> 1: /* anonymous */ [0x3720c6168e89] [/home/vsts/work/1/s/node_modules/source-map/lib/source-node.js:~342]
[pc=0x26266b1e9e1f](this=0x0dfd1438d461 ,chunk=0x348a40abacc1 <String[9]: function
,original=0x06cf466221e1 ) 2: SourceNode_walk [0x2cfbde7159f1] [/home/vsts/work/1/s/node_modules/source-map/lib/sourc...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory 1: 0x8fb090 node::Abort()
[/opt/hostedtoolcache/node/10.24.1/x64/bin/node] 2: 0x8fb0dc [/opt/hostedtoolcache/node/10.24.1/x64/bin/node] 3: 0xb0336e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/opt/hostedtoolcache/node/10.24.1/x64/bin/node] 4: 0xb035a4 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/opt/hostedtoolcache/node/10.24.1/x64/bin/node] 5: 0xef7602 [/opt/hostedtoolcache/node/10.24.1/x64/bin/node] 6: 0xf06e1f v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/opt/hostedtoolcache/node/10.24.1/x64/bin/node] 7: 0xecfe76 v8::internal::Factory::AllocateRawArray(int, v8::internal::PretenureFlag) [/opt/hostedtoolcache/node/10.24.1/x64/bin/node] 8: 0xed06fa v8::internal::Factory::NewFixedArrayWithFiller(v8::internal::Heap::RootListIndex, int, v8::internal::Object*, v8::internal::PretenureFlag) [/opt/hostedtoolcache/node/10.24.1/x64/bin/node] 9: 0xed0cb7 v8::internal::Factory::NewUninitializedFixedArray(int, v8::internal::PretenureFlag) [/opt/hostedtoolcache/node/10.24.1/x64/bin/node] 10: 0xe8403f [/opt/hostedtoolcache/node/10.24.1/x64/bin/node] 11: 0x112a6cd v8::internal::Runtime_GrowArrayElements(int, v8::internal::Object**, v8::internal::Isolate*) [/opt/hostedtoolcache/node/10.24.1/x64/bin/node] 12: 0x262669b5bf1d npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! Fasto@0.1.0 build:
react-scripts build
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the Fasto@0.1.0 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.npm ERR! A complete log of this run can be found in: npm ERR!
/home/vsts/.npm/_logs/2021-12-20T03_49_44_021Z-debug.log ##[error]Bash exited with code '1'
The pipeline YML file settings (I put the -g increase-memory-limit because i got an memory error before):
# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://learn.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- main
pool: vmImage: ubuntu-latest
steps:
- task: NodeTool@0 inputs:
versionSpec: '10.x' displayName: 'Install Node.js'
- script: |
npm install -g increase-memory-limit
npm run build displayName: 'npm install and build'