You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 19, 2018. It is now read-only.
I have a Java application which contains a "Node" (a yeoman generated web app actually) in 'src/main/webapp' dir. When pushed, heroku detects it only as a Java app and runs the corresponding buildpack. I'm trying to use this heroku-buildpack-multi but I can't find a way to specify the base directory for the web app.
Adding the buildpack as it is, fails with the error
Push rejected, failed to compile Multipack app
it expects a package.json file, for the Node buildpack, in root not in src/main/webbapp hence it fails.
My .buildpacks file is
I had a similar problem. I have a Rails app, but the frontend is a static app that needs to get built with node.
I forked the nodejs buildpack (you can find my fork here) and did some small tweaks. It's being used in production.
In the root of my project I have a .heroku_config file that contains the following:
export NODE_WORKING_DIRECTORY='/app'export NODE_BUILD_COMMAND='npm run build'
Here's what my changes do:
Source .heroku_config from the project root (source)
Append the value from NODE_WORKING_DIRECTORY at the end of the first argument that gets passed to the compile script, this means it'll use that as the build directory instead of the normal folder (source
Execute the NODE_BUILD_COMMAND command to build the app or do whatever (if it's a long running process you'll want to add that manually to your Procfile) (source)
I'm not 100% certain, but think that if you set the NODE_WORKING_DIRECTORY and NODE_BUILD_COMMAND environment variables it'll use those, and you won't have to add a .heroku_config file.
Hopefully it works out. Good luck! Please let me know if you end up using my buildpack 😄.
I have a Java application which contains a "Node" (a yeoman generated web app actually) in 'src/main/webapp' dir. When pushed, heroku detects it only as a Java app and runs the corresponding buildpack. I'm trying to use this heroku-buildpack-multi but I can't find a way to specify the base directory for the web app.
Adding the buildpack as it is, fails with the error
it expects a package.json file, for the Node buildpack, in root not in src/main/webbapp hence it fails.
My .buildpacks file is
The text was updated successfully, but these errors were encountered: