如何解决如何将Bazel项目部署到Heroku?
我有一个Angular应用程序,我用Bazel构建并运行它。
现在,我正在尝试将此应用程序部署到heroku。
因此,我在package.json
文件中添加了两个scripts。
-
heroku-postbuild
用于构建Angular应用 -
start
以启动Node.Js server,该服务为Angular应用提供服务
"scripts": {
"heroku-postbuild": "bazel build //...","start": "bazel run //client:prod_server_image",},
但是,当我将此应用程序部署到Heroku时,在构建过程中会出现此错误:
INFO: Repository npm instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)
Repository rule yarn_install defined at:
/app/.cache/bazel/_bazel_u39132/75467578e335a7c29f7ca9e47bbaa16c/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl:411:31: in <toplevel>
ERROR: An error occurred during the fetch of repository 'npm':
Traceback (most recent call last):
File "/app/.cache/bazel/_bazel_u39132/75467578e335a7c29f7ca9e47bbaa16c/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl",line 404,column 13,in _yarn_install_impl
fail("yarn_install failed: %s (%s)" % (result.stdout,result.stderr))
Error in fail: yarn_install failed: [1/4] Resolving packages...
这是我正在谈论的应用程序:https://github.com/flolu/angular-bazel-starter/tree/56435be92280af932d7f5de7adb9aed49c90bb88
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。