talk
talk copied to clipboard
npm run build : babel error
[BABEL] Note: The code generator has deoptimised the styling of /talk/node_modules/react-axe/node_modules/axe-core/axe.js as it exceeds the max of 500KB. Killed ERROR: "build:client" exited with 137
I get this too for every build, but I think it's only a warning, because my builds continue after this line without issues. Something else is probably killing your build. (Maybe your Node/NPM version is incompatible?)
@ihardyslide thank you so much for your response, actually i'm using the following versions :
MongoDB 6 Redis server v=5.0.7 NodeJS 14.18 NPM 8.0
maybe the error is related to mongodb or redis. ?
please see the log below :
[08:17:15] Using gulpfile /talk/gulpfile.js [08:17:15] Starting 'server'... [08:17:15] Starting 'server:schema'... [08:17:16] Finished 'server:schema' after 524 ms [08:17:16] Starting 'server:scripts'... [08:17:16] Starting 'server:static'... [08:17:16] Starting 'locales'... Creating an optimized production build... {"name":"coral","hostname":"dic-cloud-srv2","pid":1225279,"level":20,"config":"{\n "env": "production",\n "port": 3000,\n "dev_port": 8080,\n "defaultLocale": "en-US",\n "fallbackLocale": "en-US",\n "generateReport": false,\n "disableSourcemaps": false,\n "disableMinimize": false,\n "disableChunkSplitting": false,\n "enableTreeShake": false,\n "enableReactProfiler": false,\n "maxCores": 2\n}","msg":"loaded configuration","time":"2022-08-23T08:17:16.914Z","v":0} [08:17:17] Finished 'locales' after 1.65 s [08:17:17] Finished 'server:static' after 1.84 s 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 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 [08:17:53] Finished 'server:scripts' after 38 s [08:17:53] Finished 'server' after 38 s [BABEL] Note: The code generator has deoptimised the styling of /talk/node_modules/react-axe/node_modules/axe-core/axe.js as it exceeds the max of 500KB. [BABEL] Note: The code generator has deoptimised the styling of /talk/node_modules/react-axe/node_modules/axe-core/axe.js as it exceeds the max of 500KB.
<--- Last few GCs --->
[1225279:0x550d730] 383515 ms: Scavenge (reduce) 1950.0 (1968.5) -> 1949.2 (1969.8) MB, 12.5 / 0.0 ms (average mu = 0.217, current mu = 0.116) allocation failure [1225279:0x550d730] 383522 ms: Scavenge (reduce) 1950.2 (1971.8) -> 1949.4 (1972.0) MB, 4.3 / 0.0 ms (average mu = 0.217, current mu = 0.116) allocation failure [1225279:0x550d730] 383531 ms: Scavenge (reduce) 1950.5 (1969.0) -> 1949.6 (1970.3) MB, 6.0 / 0.0 ms (average mu = 0.217, current mu = 0.116) allocation failure
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 0xa389b0 node::Abort() [node] 2: 0x96e0af node::FatalError(char const*, char const*) [node] 3: 0xbb7a4e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node] 4: 0xbb7dc7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node] 5: 0xd73fd5 [node] 6: 0xd74b5f [node] 7: 0xd8299b v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node] 8: 0xd8655c v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node] 9: 0xd54c3b v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node] 10: 0x109d21f v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node] 11: 0x1446379 [node] Aborted (core dumped) ERROR: "build:client" exited with 134.
These errors look familiar. I once tried to build Coral on the most minimal cloud server with this result until I had a server with, I believe, 4GB memory. Process was killed with only 1-2GB.
I had the exact same issue on my local machine. You have to raise the max. available memory for node process. You can find how to do this here: https://stackoverflow.com/a/59572966
e.g. export NODE_OPTIONS="--max-old-space-size=6144" # Increase to 6 GB