首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Angular应用程序在部署到服务器时出现错误,因为` `Bash退出,代码为'134'.`

Angular应用程序在部署到服务器时出现错误,因为` `Bash退出,代码为'134'.`
EN

Stack Overflow用户
提问于 2019-11-30 23:50:19
回答 1查看 352关注 0票数 0

当我将我的应用程序部署到服务器上时,我得到了一个错误,如下所示:有人帮我排序吗?

代码语言:javascript
复制
 0: ExitFrame [pc: 0x2cf31bbcfc5d]
Security context: 0x15e43ec9d9f1 <JSObject>
    1: _send [0x341e57da61] [internal/child_process.js:751] [bytecode=0x341e52b611 offset=655](this=0x14b237e828c9 <ChildProcess map = 0xc725fc75251>,0x14b237e827a9 <JSArray[4]>,0x20a7176025b1 <undefined>,0x14b237e828a1 <Object map = 0xc725fc74a31>,0x20a7176025b1 <undefined>)
    2: send [0x341e57da21] [internal/child_process.js:650] [bytecode=0x341e52ad51 o...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: 0x95bd00 node::Abort() [ng build --output-path=/home/vsts/work/1/a]
 2: 0x95cc46 node::OnFatalError(char const*, char const*) [ng build --output-path=/home/vsts/work/1/a]
 3: 0xb3dbde v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [ng build --output-path=/home/vsts/work/1/a]
 4: 0xb3de14 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [ng build --output-path=/home/vsts/work/1/a]
 5: 0xf3ce52  [ng build --output-path=/home/vsts/work/1/a]
 6: 0xf4cf5f v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [ng build --output-path=/home/vsts/work/1/a]
 7: 0xf16175  [ng build --output-path=/home/vsts/work/1/a]
 8: 0xf1da3b v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [ng build --output-path=/home/vsts/work/1/a]
 9: 0x106ad58 v8::internal::String::SlowFlatten(v8::internal::Isolate*, v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [ng build --output-path=/home/vsts/work/1/a]
10: 0xb3b96b v8::internal::String::Flatten(v8::internal::Isolate*, v8::internal::Handle<v8::internal::String>, v8::internal::PretenureFlag) [ng build --output-path=/home/vsts/work/1/a]
11: 0xb47a69 v8::String::Utf8Length(v8::Isolate*) const [ng build --output-path=/home/vsts/work/1/a]
12: 0xa09e61 node::StringBytes::Size(v8::Isolate*, v8::Local<v8::Value>, node::encoding) [ng build --output-path=/home/vsts/work/1/a]
13: 0xa01b34 int node::StreamBase::WriteString<(node::encoding)1>(v8::FunctionCallbackInfo<v8::Value> const&) [ng build --output-path=/home/vsts/work/1/a]
14: 0xa027ae void node::StreamBase::JSMethod<&(int node::StreamBase::WriteString<(node::encoding)1>(v8::FunctionCallbackInfo<v8::Value> const&))>(v8::FunctionCallbackInfo<v8::Value> const&) [ng build --output-path=/home/vsts/work/1/a]
15: 0xbc6d2a  [ng build --output-path=/home/vsts/work/1/a]
16: 0xbc78d9 v8::internal::Builtin_HandleApiCall(int, v8::internal::Object**, v8::internal::Isolate*) [ng build --output-path=/home/vsts/work/1/a]
17: 0x2cf31bbcfc5d 
/home/vsts/work/_temp/daaf5f9e-acef-4cdd-9f33-cda1e20befa4.sh: line 5:  3632 Aborted                 (core dumped) ng build --output-path=/home/vsts/work/1/a
##[error]Bash exited with code '134'.
##[section]Finishing: npm install and build

提前谢谢。在本地构建中,我只得到了这个交战,其他的都工作得很好。

代码语言:javascript
复制
WARNING in budgets, maximum exceeded for initial. Budget 10 MB was exceeded by 407 kB.
EN

回答 1

Stack Overflow用户

发布于 2019-12-01 11:51:21

我设置了你的angular.json

代码语言:javascript
复制
"build-prod": "node --max_old_space_size=8192 'node_modules/@angular/cli/bin/ng' build --prod ",

并且是由yarn build-prod构建的-运行良好。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59117755

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档