Получение ошибки при запуске npm start для activjs в ec2 - PullRequest
0 голосов
/ 08 октября 2019

Я пытался развернуть свой узел и отреагировать на приложение AWS ec2, приложение узла работает нормально, но приложение реагирует на ошибку при npm run build

Пробовал npm start тоже, но все равно получаю ту же ошибку. Вот ошибка

Пытался установить NODE_OPTIONS = - max_old_space_size = 8172 для увеличения памяти, но ошибка остается такой же

Security context: 0x0f19d05408a1 <JSObject>
    2: visitQueue [0x581c2dbffa1] [/home/ubuntu/expert-erp/source/node_modules/@babel/traverse/lib/context.js:~96] [pc=0x302cbe090747](this=0x2c145b2a5559 <TraversalContext map = 0x32c1b0aaf1e1>,0x2c145b2a55a1 <JSArray[1]>)
    3: visitMultiple [0x581c2dbbd11] [/home/ubuntu/expert-erp/source/node_modules/@babel/traverse/lib/contex...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

Writing Node.js report to file: report.20191008.111057.11400.0.001.json
Node.js report completed
 1: 0x9d33e0 node::Abort() [node]
 2: 0x9d4596 node::OnFatalError(char const*, char const*) [node]
 3: 0xb32dbe v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xb33139 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xcde455  [node]
 6: 0xcdeae6 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node]
 7: 0xcea97a v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
 8: 0xceb885 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 9: 0xcee298 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [node]
10: 0xcb4bc7 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType) [node]
11: 0xfeaafb v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
12: 0x136d539  [node]
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! Expert-Board@0.0.1 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the Expert-Board@0.0.1 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/ubuntu/.npm/_logs/2019-10-08T11_10_57_852Z-debug.log

1 Ответ

0 голосов
/ 11 октября 2019

Если вы используете activ-scripts или create-Reaction-app, то вы можете попробовать следующее:

response-scripts --max_old_space_size = 8172 start

...