У меня есть VPS и я хочу создать vue -cli, и после того, как я запустил 'npm i', затем 'npm run build', он показывает эти ошибки, и я хочу ограничить использование памяти vue -cli для соответствия спецификациям VPS
Я использую Ubuntu 19, и моя память составляет 1 ГБ
> promoting_activation_front@0.1.0 build /var/www/promoting_frontend
> vue-cli-service build
⠙ Building for production...Starting type checking service...
Using 1 worker with 2048MB memory limit
⠦ Building for production...
<--- Last few GCs --->
[17469:0x5f3ce60] 73438 ms: Mark-sweep 485.2 (497.5) -> 482.1 (498.0) MB, 1062.6 / 0.0 ms (average mu = 0.123, current mu = 0.034) allocation failure scavenge might not succeed
[17469:0x5f3ce60] 74265 ms: Mark-sweep 485.7 (498.0) -> 482.7 (498.5) MB, 810.5 / 0.0 ms (average mu = 0.078, current mu = 0.021) allocation failure scavenge might not succeed
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0x145cc79]
Security context: 0x1f245e040921 <JSObject>
1: _walk [0x94962f2c7b9] [/var/www/promoting_frontend/node_modules/terser/dist/bundle.min.js:~1] [pc=0x27639ec77dca](this=0x29c90f60d7f1 <AST_Binary map = 0xba64fdfe151>,0x335b0e457b71 <bn map = 0x3d73333ce401>)
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Writing Node.js report to file: report.20200203.130003.17469.0.001.json
Node.js report completed
1: 0xa9d570 node::Abort() [node]
2: 0xa9f832 node::OnFatalError(char const*, char const*) [node]
3: 0xc0758e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
4: 0xc07909 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
5: 0xdb5e15 [node]
6: 0xdb64a6 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node]
7: 0xdc4d19 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
8: 0xdc5b55 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
9: 0xdc862c v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
11: 0x10dc52e v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
12: 0x145cc79 [node]
Aborted (core dumped)
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! promoting_activation_front@0.1.0 build: `vue-cli-service build`
npm ERR! Exit status 134
npm ERR!
npm ERR! Failed at the promoting_activation_front@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.