
DevOps
Jenkins 构建 Node 项目内存溢出(JavaScript heap out of memory)解决方案
1\. 问题描述 在 Jenkins CI/CD 构建前端项目(Vue / Vite / Webpack 等)时,执行: 报错: 即 Node.js 在运行时超出了默认 V8 引擎
19:36:41 > git fetch --tags --progress https://git.wulaoer.org/service +refs/heads/*:refs/remotes/origin/* # timeout=10 19:36:42 ERROR: Error cloning remote repo 'origin' 19:36:42 hudson.plugins.git.GitException: Command "git fetch --tags --progress https://git.wulaoer.org/service +refs/heads/*:refs/remotes/origin/*" returned status code 128: 19:36:42 stdout: 19:36:42 stderr: error: RPC failed; result=22, HTTP code = 404 19:36:42 fatal: The remote end hung up unexpectedly 19:36:42 19:36:42 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2661) 19:36:42 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2086) 19:36:42 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:86) 19:36:42 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:608) 19:36:42 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:837) 19:36:42 at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1223) 19:36:42 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1301) 19:36:42 at hudson.scm.SCM.checkout(SCM.java:505) 19:36:42 at hudson.model.AbstractProject.checkout(AbstractProject.java:1211) 19:36:42 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:636) 19:36:42 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 19:36:42 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:508) 19:36:42 at hudson.model.Run.execute(Run.java:1906) 19:36:42 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 19:36:42 at hudson.model.ResourceController.execute(ResourceController.java:97) 19:36:42 at hudson.model.Executor.run(Executor.java:429) 19:36:42 ERROR: Error cloning remote repo 'origin' 19:36:42 Finished: FAILURE所以看一下配置,后来发现job的日志中git地址地址不对,因为http拉取代码时最后是.git,然后我就找到git的地址信息重新替换里一下,发现可以了。
评论 0