I have a Rails application using React, Webpack, and Yarn for the client side. I have everything relating to the client side within the /client directory. This includes my yarn.lock and package.json files. I have a Procfile that cds into /client and properly runs yarn run build
. This works locally with no errors. However, when I deploy/push to Heroku, my push is rejected and I get the following error:
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...]
What this says to me is that Heroku wasn't able to find a yarn.lock file in the root level. How do I get Heroku to use the yarn.lock
file within my /client directory?
Or is the cause of this error something else entirely?