javascript - Gatsby / Docker 导致 MaxListenersExceededWarning
问题描述
我在这里遇到了一个非常奇怪的问题。
首先,当我在我的电脑上运行本地构建时,Gatsby Build
我没有任何错误,但是一旦在我们的外部机构 Gatbsy 的 Docker 环境中开始构建,就会抛出这个错误:
error 26-Oct-2020 23:41:19 error (node:8878) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added. Use emitter.setMaxListeners() to increase limit
但是构建通过了,因为这并没有阻止它完成构建,所以最后我们收到了来自 Gatsby 的成功消息:
build 26-Oct-2020 23:42:21 The following pages will be precached:
build 26-Oct-2020 23:42:21 /offline-plugin-app-shell-fallback/index.html
build 26-Oct-2020 23:42:21 success onPostBuild - 0.046s
build 26-Oct-2020 23:42:21 info Done building in 65.88 sec
这很好,但是在 Docker 中立即发生了这种情况:
error 26-Oct-2020 23:42:32
Unable to publish artifact [Code]:
Unable to publish artifact Required shared artifact:
[Code], pattern: [**/**] for PRIVATE-JOB via com.atlassian.bamboo.build.artifact.S3ArtifactHandler@4d1aff73
error 26-Oct-2020 23:42:32 The artifact is required, build will now fail.
simple 26-Oct-2020 23:42:32 The artifact hasn't been successfully published after 8.939 s
他们说这可能是因为 EventEmitter 内存泄漏,但我在本地机器上构建期间没有那个错误,所以几乎不可能调试它。
有没有人知道可能导致此问题的原因,可能是 Node.js 版本不匹配吗?
解决方案
推荐阅读
- angular - 使用茉莉弹珠进行单元测试
- python - 如果我的 Mac 中有 3.x python 版本,为什么 PythonTeX 正在运行 2.x 版本?
- mysql - 将 SQL Query 中两列之间的百分比计算为每天另一列
- gstreamer - GStreamer。从 udp 播放原始 h264
- c++ - 流式传输到多个输出设备
- amazon-web-services - ECS 移除所有实例
- solr - 如何在 Hybris 的前端显示 facet 值?
- python - Django Python 组按 IP 网络掩码
- spring-boot - 服务中的多对多关系使用
- c# - 如何选择元素的后代字符串?