npm run build ERR errno 134 в приложении create-response-app
Я создал приложение с приложением create-response-app и развернул его в Digital Ocean Droplet с Ubuntu 18.04.3.
Использование узла v13.14.0 npm 6.14.6
Я выполнил экспорт NODE_OPTIONS="- max-old-space-size=8192"
Теперь, когда я пытаюсь выполнить команду npm run build, я получаю ошибку 134. Журналы не настолько информативны.
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'build' ]
2 info using npm@6.14.6
3 info using node@v12.18.3
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle myapp@0.1.0~prebuild: myapp@0.1.0
6 info lifecycle myapp@0.1.0~build: myapp@0.1.0
7 verbose lifecycle myapp@0.1.0~build: unsafe-perm in lifecycle true
8 verbose lifecycle myapp@0.1.0~build: PATH: /usr/local/lib/node_modules/npm$
9 verbose lifecycle myapp@0.1.0~build: CWD: /home/david/myapp
10 silly lifecycle myapp@0.1.0~build: Args: [ '-c', 'node scripts/build.js' ]
11 silly lifecycle myapp@0.1.0~build: Returned: code: 134 signal: null
12 info lifecycle myapp@0.1.0~build: Failed to exec build script
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_pro$
14 verbose pkgid myapp@0.1.0
15 verbose cwd /home/david/myapp
16 verbose Linux 4.15.0-112-generic
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
18 verbose node v12.18.3
19 verbose npm v6.14.6
20 error code ELIFECYCLE
21 error errno 134
22 error myapp@0.1.0 build: `node scripts/build.js`
22 error Exit status 134
23 error Failed at the myapp@0.1.0 build script.
23 error This is probably not a problem with npm. There is likely additional lo$
24 verbose exit [ 134, true ]
и у меня есть эта трассировка стека:
==== JS stack trace =========================================
0: ExitFrame [pc: 0x13cf019]
1: StubFrame [pc: 0x1355ea1]
Security context: 0x2a40369408d1 <JSObject>
2: _replaceInStringNode [0x1687370870e9] [/home/david/myapp/node_modules/webpack-sources/lib/ReplaceSource.js:~194] [pc=0x2c71cda9f975](this=0x035173805049 <Source map = 0x336c4ecf7cf9>,0x01fcf43b97f1 <JSArray[309]>,0x01fcf43b97a1 <ReplacementEnumerator map = 0x13294d6fe199>,0x01fcf43ba361 <JSFunction getOriginalSource (sfi...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0xa093f0 node::Abort() [node]
2: 0xa097fc node::OnFatalError(char const*, char const*) [node]
3: 0xb842ae v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
4: 0xb84629 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
5: 0xd30fe5 [node]
6: 0xd31676 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node]
7: 0xd3def5 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
8: 0xd3eda5 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
9: 0xd4185c v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
10: 0xd0830b v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
11: 0x1049f4e v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
12: 0x13cf019 [node]
Aborted (core dumped)
Он хорошо работает в моей локальной среде?
Я попробовал понизить версию узла, но получил ошибку 137. Это похоже на проблему с памятью, но у меня должно быть много памяти? Когда я возвращаюсь к предыдущей версии репо, которая работала, она тоже не строится?