Reputation: 599
I just introduced npm modules into my Rails app (locally) and have been trying to deploy it to Heroku. I recall reading that if I have a package.json file at the root directory of my app, Heroku would detect it and run npm install upon build. My assets, however, are apparently not being installed (for example, webpack). How can I make this work?
Upvotes: 2
Views: 655
Reputation: 599
The solution is to use multiple buildpacks.
Using Multiple Buildpacks for an App
For example, to set a buildpack:
heroku buildpacks:set heroku/ruby
And to add a buildpack:
heroku buildpacks:add --index 1 heroku/nodejs
Upvotes: 3