我们有一个使用 nodejs10 运行时的 App Engine 标准应用程序,它已经开始部署失败并输出以下错误:
... trimmed
Step #1 - "builder": INFO npm_install took 46 seconds
Step #1 - "builder": INFO starting: tar_runtime_package
Step #1 - "builder": INFO tar_runtime_package tar -pcf /tmp/tmpXKvzdH.tar --hard-dereference --transform flags=r;s,^,/srv/node_modules/, --exclude *.pyc .
Step #1 - "builder": INFO `tar_runtime_package` stdout:
Step #1 - "builder":
Step #1 - "builder": INFO tar_runtime_package took 26 seconds
Step #1 - "builder": INFO starting: gzip_tar_runtime_package
Step #1 - "builder": INFO gzip_tar_runtime_package gzip /tmp/tmpXKvzdH.tar -1
Step #1 - "builder": INFO `gzip_tar_runtime_package` stdout:
Step #1 - "builder":
Step #1 - "builder": INFO gzip_tar_runtime_package took 28 seconds
Step #1 - "builder": INFO starting: rm_node_modules
Step #1 - "builder": INFO rm_node_modules rm -rf /workspace/node_modules
Step #1 - "builder": INFO rm_node_modules took 0 seconds
Step #1 - "builder": INFO building_packages_json_layer took 109 seconds
Step #1 - "builder": INFO build process for FTL image took 233 seconds
Step #1 - "builder": INFO full build took 255 seconds
Step #1 - "builder": ERROR rm_node_modules rm -rf /workspace/node_modules
Step #1 - "builder": exited with error [Errno 12] Cannot allocate memory
Step #1 - "builder": rm_node_modules is likely not on the path
Step #1 - "builder": Traceback (most recent call last):
Step #1 - "builder": File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
Step #1 - "builder": "__main__", fname, loader, pkg_name)
Step #1 - "builder": File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
Step #1 - "builder": exec code in run_globals
Step #1 - "builder": File "/usr/local/bin/ftl.par/__main__.py", line 65, in <module>
Step #1 - "builder": File "/usr/local/bin/ftl.par/__main__.py", line 60, in main
Step #1 - "builder": File "/usr/local/bin/ftl.par/__main__/ftl/common/ftl_error.py", line 77, in InternalErrorHandler
Step #1 - "builder": IOError: [Errno 2] No such file or directory: '""/output'
没有包失败……我们最近没有在我们的 package.json 中包含任何新包……之前的版本运行得很好,只是我们的 javascript 代码发生了一些变化。构建似乎已成功完成,但随后在清理步骤中失败。
我在 superuser.com 中找不到任何关于类似错误的参考资料,有人遇到过这个吗?
就我而言,https: //www.npmjs.com/package/puppeteer 恰好在这些故障开始的时间发生了碰撞。强制 puppeteer 到 1.17.0
package.json
解决了这个问题。