云效node 编译时没有使用根目录的.npmrc文件,导致不能下载私有库,编译失败,怎么解决?https://flow.aliyun.com/pipelines/1652558/current
[08:24:57] [User Command] + cat .npmrc
[08:24:57] @saber:registry=https://center.javablade.com/api/packages/blade/npm/
[08:24:57] //center.javablade.com/api/packages/blade/npm/:_authToken=9f74c92c06ed857f8d1b70e8ba260b32850ba
[08:24:57]
[08:24:57] @nutflow:registry=https://git.nutflow.vip/api/packages/blade-workflow/npm/
[08:24:57] //git.nutflow.vip/api/packages/blade-workflow/npm/:_authToken=15d002ef629f7960cea2e042b4c5dc66c6+ yarn install
[08:26:40] <--- Last few GCs --->
[08:26:40]
[08:26:40] [1184:0x5b479e0] 62018 ms: Scavenge (reduce) 2041.7 (2081.0) -> 2041.1 (2081.3) MB, 3.7 / 0.0 ms (average mu = 0.200, current mu = 0.120) allocation failure
[08:26:40] [1184:0x5b479e0] 62081 ms: Scavenge (reduce) 2041.9 (2081.3) -> 2041.3 (2081.8) MB, 3.2 / 0.0 ms (average mu = 0.200, current mu = 0.120) allocation failure
[08:26:40] [1184:0x5b479e0] 62162 ms: Scavenge (reduce) 2042.3 (2081.8) -> 2041.7 (2082.0) MB, 4.0 / 0.0 ms (average mu = 0.200, current mu = 0.120) allocation failure
[08:26:40]
[08:26:40]
[08:26:40] <--- JS stacktrace --->
[08:26:40]
[08:26:40] FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
[08:26:40] 1: 0xb02d90 node::Abort() [/root/.nvm/versions/node/v16.8.0/bin/node]
[08:26:40] 2: 0xa18123 node::FatalError(char const, char const) [/root/.nvm/versions/node/v16.8.0/bin/node]
[08:26:40] 3: 0xceb85e v8::Utils::ReportOOMFailure(v8::internal::Isolate, char const, bool) [/root/.nvm/versions/node/v16.8.0/bin/node]
[08:26:40] 4: 0xcebbd7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate, char const, bool) [/root/.nvm/versions/node/v16.8.0/bin/node]
[08:26:40] 5: 0xeb55b5 [/root/.nvm/versions/node/v16.8.0/bin/node]
[08:26:40] 6: 0xeb60a4 [/root/.nvm/versions/node/v16.8.0/bin/node]
[08:26:40] 7: 0xec4517 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/root/.nvm/versions/node/v16.8.0/bin/node]
[08:26:40] 8: 0xec78cc v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/root/.nvm/versions/node/v16.8.0/bin/node]
[08:26:40] 9: 0xe8a1ec v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/root/.nvm/versions/node/v16.8.0/bin/node]
[08:26:40] 10: 0x11f70a6 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long, v8::internal::Isolate) [/root/.nvm/versions/node/v16.8.0/bin/node]
[08:26:40] 11: 0x15cdf39 [/root/.nvm/versions/node/v16.8.0/bin/node]
[08:26:50] error Command failed with signal "SIGABRT".
[08:26:50] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[08:26:50] [ERROR] BUILD ERROR
[08:26:50] [ERROR] 155599595
[08:26:50] [ERROR] 1
您用npm install试一下,这个需要设置一下 max内存。这样试下呢 1、安装:npm install cross-env increase-memory-limit
2、在package.json增加fix-memory-limit
"scripts": {
"fix-memory-limit": "cross-env LIMIT=4096 increase-memory-limit",
},
1
2
3
1
2
3
3、执行npm run fix-memory-limit
4、执行以上步骤后执行npm run dev有可能还会报错: “node –max-old-space-size=8192不是内部或外部命令``”,按第5步操作即可 。可以参考这个文档设置一下内存:https://blog.csdn.net/Tiger_lin1/article/details/125634867
这个任务的默认配置是4C8G。最大可以设置8*1024。如果设置了之后还是内存溢出,可以考虑私有构建集群:https://help.aliyun.com/document_detail/201868.html 如果还不行那可能得考虑私有构建机了,https://help.aliyun.com/document_detail/201868.html?spm=a2c4g.606512.0.i1 此回答整理自钉群“云效交付域答疑群”
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
云效,企业级一站式研发协同平台,数十万企业都在用。支持公共云、专有云和混合云多种部署形态,通过云原生新技术和研发新模式,助力创新创业和数字化转型企业快速实现研发敏捷和组织敏捷,打造“双敏”组织,实现多倍效能提升。