2

Building (npm run build) my VueJs project gives an error.

package.json

{
    "name": "acme-web",
    "version": "0.1.0",
    "private": true,
    "scripts": {
        "serve": "vue-cli-service serve",
        "build": "vue-cli-service build",
        "test:e2e": "vue-cli-service test:e2e",
        "test:unit": "vue-cli-service test:unit"
    },
    "dependencies": {
        "axios": "^0.21.1",
        "bootstrap": "^4.6.0",
        "ckeditor4-vue": "^0.1.0",
        "connect-history-api-fallback": "^1.5.0",
        "core-js": "^2.6.12",
        "cors": "^2.8.5",
        "devextreme": "19.2.6",
        "devextreme-vue": "19.2.6",
        "express": "^4.16.4",
        "express-async-errors": "^3.1.1",
        "feather-icons": "^4.28.0",
        "jquery": "^3.6.0",
        "jspdf": "^2.3.1",
        "jspdf-autotable": "^3.5.14",
        "jwt-decode": "^2.2.0",
        "lodash": "^4.17.21",
        "moment": "^2.29.1",
        "perfect-scrollbar": "^1.5.0",
        "popper.js": "^1.16.1",
        "uuid": "^3.4.0",
        "vee-validate": "^2.2.15",
        "vue": "^2.6.12",
        "vue-axios": "^2.1.5",
        "vue-feather": "^1.1.1",
        "vue-feather-icon": "^1.2.0",
        "vue-feather-icons": "^5.1.0",
        "vue-multiselect": "^2.1.6",
        "vue-property-decorator": "^8.5.1",
        "vue-router": "^3.5.1",
        "vue-signature-pad": "^2.0.0",
        "vue-toastr": "^2.1.2",
        "vuejs-paginate": "^2.1.0",
        "vuex": "^3.6.2",
        "xlsx": "^0.16.9"
    },
    "devDependencies": {
        "@vue/cli-plugin-babel": "^3.12.1",
        "@vue/cli-plugin-e2e-cypress": "^3.12.1",
        "@vue/cli-plugin-unit-mocha": "^4.5.11",
        "@vue/cli-service": "^4.5.11",
        "@vue/test-utils": "1.0.0-beta.29",
        "chai": "^4.3.4",
        "vue-template-compiler": "^2.6.12"
    }
}

error

$> npm run build

> acme-web@0.1.0 build /home/bopsi/Projects/Acme/acme-web
> vue-cli-service build


⠙  Building for production...
<--- Last few GCs --->

[68558:0x628a140]   310639 ms: Scavenge (reduce) 1908.9 (2005.5) -> 1908.8 (2008.5) MB, 1.7 / 0.0 ms  (average mu = 0.958, current mu = 0.955) allocation failure 
[68558:0x628a140]   310642 ms: Scavenge (reduce) 1909.7 (2012.5) -> 1909.6 (2013.5) MB, 1.8 / 0.0 ms  (average mu = 0.958, current mu = 0.955) allocation failure 
[68558:0x628a140]   310646 ms: Scavenge (reduce) 1910.6 (2007.5) -> 1910.6 (2010.5) MB, 1.8 / 0.0 ms  (average mu = 0.958, current mu = 0.955) allocation failure 


<--- JS stacktrace --->

FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory
 1: 0xa04200 node::Abort() [node]
 2: 0x94e4e9 node::FatalError(char const*, char const*) [node]
 3: 0xb797be v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xb79b37 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xd343c5  [node]
 6: 0xd64f5e v8::internal::EvacuateNewSpaceVisitor::Visit(v8::internal::HeapObject, int) [node]
 7: 0xd70f96 v8::internal::FullEvacuator::RawEvacuatePage(v8::internal::MemoryChunk*, long*) [node]
 8: 0xd5d17f v8::internal::Evacuator::EvacuatePage(v8::internal::MemoryChunk*) [node]
 9: 0xd5d3f8 v8::internal::PageEvacuationTask::RunInParallel(v8::internal::ItemParallelJob::Task::Runner) [node]
10: 0xd4fcd9 v8::internal::ItemParallelJob::Run() [node]
11: 0xd72ef0 void v8::internal::MarkCompactCollectorBase::CreateAndExecuteEvacuationTasks<v8::internal::FullEvacuator, v8::internal::MarkCompactCollector>(v8::internal::MarkCompactCollector*, v8::internal::ItemParallelJob*, v8::internal::MigrationObserver*, long) [node]
12: 0xd7378c v8::internal::MarkCompactCollector::EvacuatePagesInParallel() [node]
13: 0xd73955 v8::internal::MarkCompactCollector::Evacuate() [node]
14: 0xd85941 v8::internal::MarkCompactCollector::CollectGarbage() [node]
15: 0xd41c68 v8::internal::Heap::MarkCompact() [node]
16: 0xd43758 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
17: 0xd45695 v8::internal::Heap::HandleGCRequest() [node]
18: 0xcebcd7 v8::internal::StackGuard::HandleInterrupts() [node]
19: 0xe37eec v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<false>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [node]
20: 0xe39ab7 v8::internal::JsonStringifier::SerializeArrayLikeSlow(v8::internal::Handle<v8::internal::JSReceiver>, unsigned int, unsigned int) [node]
21: 0xe35aab v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<true>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [node]
22: 0xe359d3 v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<true>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [node]
23: 0xe3893b v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<false>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [node]
24: 0xe39ab7 v8::internal::JsonStringifier::SerializeArrayLikeSlow(v8::internal::Handle<v8::internal::JSReceiver>, unsigned int, unsigned int) [node]
25: 0xe35aab v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<true>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [node]
26: 0xe359d3 v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<true>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [node]
27: 0xe359d3 v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<true>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [node]
28: 0xe3893b v8::internal::JsonStringifier::Result v8::internal::JsonStringifier::Serialize_<false>(v8::internal::Handle<v8::internal::Object>, bool, v8::internal::Handle<v8::internal::Object>) [node]
29: 0xe3a2ff v8::internal::JsonStringify(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) [node]
30: 0xc24f7f v8::internal::Builtin_JsonStringify(int, unsigned long*, v8::internal::Isolate*) [node]
31: 0x1401319  [node]
Aborted (core dumped)
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! acme-web@0.1.0 build: `vue-cli-service build`
npm ERR! Exit status 134
npm ERR! 
npm ERR! Failed at the acme-web@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/bops/.npm/_logs/2021-03-15T12_38_56_342Z-debug.log

What is causing this error? I tried passing --max_old_space_size=8192 params, but same result.

Note

Running locally with npm run serve works as expected.

Bopsi
  • 2,090
  • 5
  • 36
  • 58

1 Answers1

0

I have the save problem but it is with npm run serve

eeyvee
  • 33
  • 7