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

后端 未结 6 2274
终归单人心
终归单人心 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:03

    I'll add an answer for document another possible use-case. I experienced something similar, multiple buildpacks and I had checked everything in all answers:

    • node-js was declared first in .buildpacks file
    • a yarn.lock was added in the root of the project
    • yarn dependency declared under engines on package.json

    Nevertheless yarn was not picking up since I was using an older version of node-js buildpack.


    Bumping the version of the buildpack the latest solve my problem:

    https://github.com/heroku/heroku-buildpack-nodejs#v118
    

提交回复
热议问题