【发布时间】:2017-08-18 17:13:03
【问题描述】:
我有一个在客户端使用 React、Webpack 和 Yarn 的 Rails 应用程序。我在 /client 目录中拥有与客户端相关的所有内容。这包括我的 yarn.lock 和 package.json 文件。我有一个 cd 到 /client 并正确运行 yarn run build 的 Procfile。这在本地有效,没有错误。但是,当我部署/推送到 Heroku 时,我的推送被拒绝并且我收到以下错误:
remote: cd client && yarn run build:production
remote: sh: 1: yarn: not found
remote: rake aborted!
remote: Command failed with status (127): [cd client && yarn run build:production...]
这对我来说是 Heroku 无法在根级别找到 yarn.lock 文件。如何让 Heroku 使用 /client 目录中的 yarn.lock 文件?
或者这个错误的原因完全是别的什么?
【问题讨论】:
标签: ruby-on-rails heroku procfile yarnpkg