Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Javascript out of memory when building with loom-js #355

Open
Rtlagot opened this issue Aug 4, 2021 · 2 comments
Open

Javascript out of memory when building with loom-js #355

Rtlagot opened this issue Aug 4, 2021 · 2 comments

Comments

@Rtlagot
Copy link

Rtlagot commented Aug 4, 2021

Hi,

I have an issue while building my project with loom-js as a dependency. Anytime I try to build it, I encounter this error:

 @ ./resources/js sync \.vue$/
 @ ./resources/js/app.js
 @ multi ./resources/js/app.js ./resources/sass/app.scss


<--- Last few GCs --->

[32357:0x16e3b10]    24663 ms: Mark-sweep 973.7 (1068.6) -> 973.5 (1052.1) MB, 139.4 / 0.0 ms  (average mu = 0.470, current mu = 0.000) last resort GC in old space requested
[32357:0x16e3b10]    24772 ms: Mark-sweep 973.5 (1052.1) -> 973.5 (1038.6) MB, 108.7 / 0.0 ms  (average mu = 0.333, current mu = 0.000) last resort GC in old space requested


<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 0x243885dd452b]
Security context: 0x0fd4d80aee11 <JSObject>
    1: stringToBytes [0xa12dca4caf9] [/home/robin/Work/Projects/Tests/qgram/node_modules/charenc/charenc.js:~18] [pc=0x243886ca3102](this=0x230cf7f9b569 <Object map = 0x69889b117c9>,str=0x3232d915db01 <Very long string[57918597]>)
    2: md5 [0x230cf7f9b591] [/home/robin/Work/Projects/Tests/qgram/node_modules/md5/md5.js:~8] [pc=0x243886c9e695](this=0x3e291d6...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: 0x7fe83b45346c node::Abort() [/lib/x86_64-linux-gnu/libnode.so.64]
 2: 0x7fe83b4534b5  [/lib/x86_64-linux-gnu/libnode.so.64]
 3: 0x7fe83b67fe6a v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/lib/x86_64-linux-gnu/libnode.so.64]
 4: 0x7fe83b6800e1 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/lib/x86_64-linux-gnu/libnode.so.64]
 5: 0x7fe83ba1ac66  [/lib/x86_64-linux-gnu/libnode.so.64]
 6: 0x7fe83ba2ea37 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/lib/x86_64-linux-gnu/libnode.so.64]
 7: 0x7fe83b9fabfb v8::internal::Factory::AllocateRawArray(int, v8::internal::PretenureFlag) [/lib/x86_64-linux-gnu/libnode.so.64]
 8: 0x7fe83b9fb098 v8::internal::Factory::NewFixedArrayWithFiller(v8::internal::Heap::RootListIndex, int, v8::internal::Object*, v8::internal::PretenureFlag) [/lib/x86_64-linux-gnu/libnode.so.64]
 9: 0x7fe83b9c2850  [/lib/x86_64-linux-gnu/libnode.so.64]
10: 0x7fe83bc3a479 v8::internal::Runtime_GrowArrayElements(int, v8::internal::Object**, v8::internal::Isolate*) [/lib/x86_64-linux-gnu/libnode.so.64]

I have tried many things, like changing de max scope size, but nothing seems to work. Do you have any idea ? Here are my dependencies:

"dependencies": {
        "@fortawesome/fontawesome-svg-core": "^1.2.27",
        "@fortawesome/free-solid-svg-icons": "^5.12.1",
        "@fortawesome/vue-fontawesome": "^2.0.0",
        "@handsontable/vue": "^4.1.1",
        "babel-eslint": "^10.0.3",
        "bootstrap-vue": "^2.5.0",
        "chart.js": "^2.9.3",
        "ckeditor4-vue": "^1.3.1",
        "fabric": "^4.0.0-beta.7",
        "google-palette": "^1.1.0",
        "handsontable": "7.4.2",
        "laravel-vue-pagination": "^2.3.1",
        "loom-js": "^1.79.0",
        "moment": "^2.24.0",
        "offline": "^0.0.1",
        "svg-inline-loader": "^0.8.2",
        "terser": "4.6.4",
        "tui-image-editor": "^3.8.0",
        "uuid": "^7.0.0",
        "v-viewer": "^1.5.1",
        "vue-chartjs": "^3.5.0",
        "vue-fullscreen": "^2.1.5",
        "vue-i18n": "^8.15.3",
        "vue-material": "^1.0.0-beta-15",
        "vue-moment": "^4.1.0",
        "vue-multiselect": "^2.1.6",
        "vue-router": "^3.5.1",
        "vue-tiny-slider": "^0.1.39",
        "vue-toasted": "^1.1.28",
        "vue2-daterange-picker": "v0.5.1",
        "vue2-dropzone": "^3.6.0",
        "vue2-timeago": "^1.2.6",
        "vuedraggable": "^2.23.2",
        "vuex": "^3.1.2",
        "vuex-map-fields": "^1.4.0",
        "web3": "^1.3.6"
    }

Thanks a lot !

@enlight
Copy link
Contributor

enlight commented Aug 4, 2021

What version of NodeJS are you using?

@Rtlagot
Copy link
Author

Rtlagot commented Aug 6, 2021

Hi again,

I'm currently using the v14.17.4. It works some times, but still have this error a lot of time during the build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants