How to get Heroku to recognize a yarn.lock or package.json within a subdirectory (not root)

后端 未结 6 2236
终归单人心
终归单人心 2021-02-19 10:11

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.

6条回答
  •  终归单人心
    2021-02-19 11:08

    Make sure to use both ruby and node buildpacks. I got this error when I didn't.

    Execute these in your root folder:

    heroku buildpacks:set heroku/ruby
    heroku buildpacks:add --index 1 heroku/nodejs
    

    Sources: https://devcenter.heroku.com/articles/using-multiple-buildpacks-for-an-app

    https://github.com/shakacode/react_on_rails/blob/master/docs/additional-reading/heroku-deployment.md

提交回复
热议问题