Hi i have this error every time i push to my github repo, the build is working on my machin but i get this memory error when trying to use actions.
i have already used this on other repos and it's working very well but i can't figure it out this time.
thank you for your help, this is the github output:
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated [email protected]: Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated [email protected]: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated [email protected]: This SVGO version is no longer supported. Upgrade to v2.x.x.
npm WARN deprecated [email protected]: The SDK name changed to @emailjs/browser
npm WARN deprecated [email protected]: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated @fortawesome/[email protected]: Please upgrade to 6.1.0. https://fontawesome.com/docs/changelog/
npm WARN deprecated [email protected]: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated [email protected]: core-js-pure@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js-pure.
npm WARN deprecated [email protected]: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
added 1619 packages, and audited 1620 packages in 1m
181 packages are looking for funding
run `npm fund` for details
18 vulnerabilities (2 moderate, 14 high, 2 critical)
To address issues that do not require attention, run:
npm audit fix
To address all issues (including breaking changes), run:
npm audit fix --force
Run `npm audit` for details.
> [email protected] build
> 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 --->
[1771:0x52879b0] 30952 ms: Scavenge 2036.6 (2077.6) -> 2036.6 (2082.6) MB, 4.2 / 0.0 ms (average mu = 0.235, current mu = 0.218) allocation failure
[1771:0x52879b0] 30960 ms: Scavenge 2039.4 (2082.6) -> 2039.5 (2083.6) MB, 6.2 / 0.0 ms (average mu = 0.235, current mu = 0.218) allocation failure
[1771:0x52879b0] 30970 ms: Scavenge 2040.4 (2083.6) -> 2040.1 (2093.8) MB, 8.7 / 0.0 ms (average mu = 0.235, current mu = 0.218) allocation failure
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0xb02930 node::Abort() [/usr/local/bin/node]
2: 0xa18149 node::FatalError(char const*, char const*) [/usr/local/bin/node]
3: 0xcdd16e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
4: 0xcdd4e7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
5: 0xe94b55 [/usr/local/bin/node]
6: 0xe95636 [/usr/local/bin/node]
7: 0xea3b5e [/usr/local/bin/node]
8: 0xea45a0 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/bin/node]
9: 0xea7495 v8::internal::Heap::HandleGCRequest() [/usr/local/bin/node]
10: 0xe34b37 v8::internal::StackGuard::HandleInterrupts() [/usr/local/bin/node]
11: 0x11e0f15 v8::internal::Runtime_StackGuard(int, unsigned long*, v8::internal::Isolate*) [/usr/local/bin/node]
12: 0x15d5439 [/usr/local/bin/node]
Error: Process completed with exit code 1.```
CodePudding user response:
I fixed it. you need to add "CI=false;" to the build part on Package.json so it becomes: "build": "CI=false && react-scripts build",