error in publishing app

Please run expo diagnostics and paste the log that’s printed out along with your question or issue!
**
Expo CLI 3.17.24 environment info:
System:
OS: Linux 4.15 Ubuntu 18.04.4 LTS (Bionic Beaver)
Shell: 4.4.20 - /bin/bash
Binaries:
Node: 13.11.0 - ~/.nvm/versions/node/v13.11.0/bin/node
npm: 6.14.3 - ~/.nvm/versions/node/v13.11.0/bin/npm
npmPackages:
expo: ~37.0.3 => 37.0.7
react: ~16.9.0 => 16.9.0
react-native: https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz => 0.61.4
npmGlobalPackages:
expo-cli: 3.17.24
**

My app is working fine when i run it using expo start. I have to provide the deployed link to my employer so that they can check its working.

App details

Simple app integrated with lex chatbot using aws SDK

When I try to publish the app using expo publish it starts building

Building iOS bundle
Building JavaScript bundle [================================================================== ] 98%
and then at sudden following log appears
transform[stdout]:
transform[stdout]: <— Last few GCs —>
transform[stdout]: art of marking 4355 ms) (average mu = 0.180, current mu = 0.024) allocati[9360:0x45b5c90] 236468 ms: Mark-sweep 1900.5 (1920.1) -> 1897.4 (1920.3) MB, 5831.8 / 0.0 ms (+ 152.0 ms in 54 steps since start of marking, biggest step 7.9 ms, walltime since start of marking 6011 ms) (average mu = 0.086, current mu = 0.006) allocat[9360:0x45b5c90] 240923 ms: Mark-sweep 1900.3 (1920.3) -> 1897.5 (1918.1) MB, 4443.6 / 0.0 ms (average mu = 0.049, current mu = 0.003) allocation failure scavenge might not succeed
transform[stdout]:
transform[stdout]:
transform[stdout]: <— JS stacktrace —>
transform[stdout]:
transform[stdout]: ==== JS stack trace =========================================
transform[stdout]:
transform[stdout]: 0: ExitFrame [pc: 0x13de0d9]
transform[stdout]: Security context: 0x3c9472c80921
transform[stdout]: 1: /
anonymous /(aka / anonymous /) [0x2efab97e36d1] [0x1ff47f3c04b9 :~2063] [pc=0x3d838450964c](this=0x1ff47f3c04b9 ,0x1ff47f3c79e9 <String[#1]: ">)
transform[stdout]: 2: /
anonymous /(aka / anonymous /) [0x2efab97e0f71] [0x1ff47f3c04b9 :~2277] [pc=0x3d8384523b7f](this=0x1ff47f3c04b9 ,0x1ff47f3c79e9 <String[#1]: ">)
transform[stdout]: 3…
transform[stdout]:
transform[stderr]: FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
transform[stderr]:
transform[stderr]: Writing Node.js report to file: report.20200416.015622.9360.0.001.json
transform[stderr]:
transform[stderr]: Node.js report completed
transform[stderr]: 1: 0xa10730 node::Abort() [/home/shiraz/.nvm/versions/node/v13.11.0/bin/node]
transform[stderr]: 2: 0xa10b75 node::OnFatalError(char const
, char const
) [/home/shiraz/.nvm/versions/node/v13.11.0/bin/node]
transform[stderr]: 3: 0xb859ce v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/home/shiraz/.nvm/versions/node/v13.11.0/bin/node]
transform[stderr]: 4: 0xb85d49 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/home/shiraz/.nvm/versions/node/v13.11.0/bin/node]
transform[stderr]: 5: 0xd34255 [/home/shiraz/.nvm/versions/node/v13.11.0/bin/node]
transform[stderr]: 6: 0xd348e6 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [/home/shiraz/.nvm/versions/node/v13.11.0/bin/node]
transform[stderr]: 7: 0xd43159 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/home/shiraz/.nvm/versions/node/v13.11.0/bin/node]
transform[stderr]: 8: 0xd43f95 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/home/shiraz/.nvm/versions/node/v13.11.0/bin/node]
transform[stderr]: 9: 0xd46a6c v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/home/shiraz/.nvm/versions/node/v13.11.0/bin/node]
transform[stderr]: 10: 0xd0d644 v8::internal::factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/home/shiraz/.nvm/versions/node/v13.11.0/bin/node]
transform[stderr]: 11: 0x105a93e v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/home/shiraz/.nvm/versions/node/v13.11.0/bin/node]
transform[stderr]: 12: 0x13de0d9 [/home/shiraz/.nvm/versions/node/v13.11.0/bin/node]
node_modules/aws-sdk/dist/aws-sdk-react-native.js: Call retries were exceeded
› Closing Expo server
node_modules/aws-sdk/dist/aws-sdk-react-native.js: Call retries were exceeded
Failed building JavaScript bundle.
::ffff:127.0.0.1 - - [15/Apr/2020:20:37:06 +0000] “GET /node_modules/expo/AppEntry.bundle?dev=false&minify=true&hot=false&platform=ios HTTP/1.1” 500 - “-” “axios/0.19.0”
› Stopping Metro bundler
Packager URL http://127.0.0.1:19001/node_modules/expo/AppEntry.bundle?dev=false&minify=true&hot=false&platform=ios returned unexpected code 500. Please open your project in the Expo app and see if there are any errors. Also scroll up and make sure there were no errors or warnings when opening your project.

**
I did try to resolve this issue using
– NODE_OPTIONS="–max-old-space-size=2048”
– NODE_OPTIONS="–max-old-space-size=4096”
– NODE_OPTIONS="–max-old-space-size=8192”
but nothing helped

Please help

While deep digging into my problem I found something similar to my problem here js heap out of memory
I found a comment by @adamjnav there which may be the reason of build failure in my case .

This is the file in my node module which is of approx 5 MB.

Please help how can I resolve this problem.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.