We've moved discussions to Discord

With the latest bundling change, is it necessary to add NodeJS buildpack when deploying to Heroku?

Aska Konomi
I created a new Jumpstart project yesterday, the new features are awesome, especially the js/css bundling change. But when I tried to deploy to Heroku today, I found I had to add a NodeJS buildpack, otherwise the precompile will fail on Heroku (it says yarn is not installed).

If possible I prefer not to add another buildpack, is this unavoidable?

Also, maybe the deploy documentation for JSP needs to be updated with recent changes?
Seungyong Lim
Yes did you get any progress on this? It fails when I deploy to heroku.. It looks like JS and css process is missing.
Aska Konomi
Seungyong Lim Yes, I can deploy to Heroku if I add a NodeJS buildpack before the Ruby one.

You can add buildpacks from the app dashboard (even before the first push), or from the command line.
See the documentation here:
https://devcenter.heroku.com/articles/buildpacks#setting-a-buildpack-on-an-application

In the end the buildpacks should look like this:
1. heroku/nodejs
2. heroku/ruby

I am just wondering is the nodejs buildpack really necessary, or is there a setting to avoid adding the buildpack.
Chris Oliver
Yes it is, same as before when we were using Webpacker.
Seungyong Lim
thanks! Aska Konomi . I don't ever remember adding heroku/nodejs when I added webpack a few years ago..I think there are things heroku dyno comes prebuilt and I am wondering if that was the case. Anyway thanks for your reply! 
Chris Oliver
Heroku may have added a special case for webpacker.

I think schneems from heroku was on the bundling repo issue to get Heroku updated to detect this automatically.

For now, if anyone else finds this, you can just add the nodejs buildpack as the first pack on your app before Ruby.
Notifications
You’re not receiving notifications from this thread.