I am trying to deploy a react app bootstrapped with create-react-app to heroku. The build keeps failing, and I get this error on the command line and in the build log
App not compatible with buildpack:
https://github.com/AdamT213/RateYourAcquaintance.git
bash:
/app/tmp/buildpacks/85d7c3f242750d8981190d9ed3f29461a37d776664b86f3dc3263563e08c29443b03b01355b70cb2a4a461abab934f47aa7919c42b019918961b2ebf902b1fa/bin/detect
No such file or directory
More info: https://devcenter.heroku.com/articles/buildpacks#detection-
failure
! Push failed
What does this mean?
Okay, I see now. I was trying to set my app's url as the buildpack, when I really need this url: https://github.com/mars/create-react-app-buildpack.git. Makes sense now!
I would also advise checking what files the gitignore file are ignoring. In particular, the "BUILD" folder needs to not be ignored (and it seems it is by default for me)
Related
I have a flask application, that I want to push to Heroku, but is failing. I get the error:
Requested runtime (python-3.5.1) is not available for this stack
I looked into my runtime.txt file:
python-3.6.5
which seems to be the right version of python.
in my requirements.txt I have this:
Flask==0.12.0
Jinja2==2.8.1
gunicorn==19.6.0
I only use Flask and Jinja so far.
How come I still get this error
Make sure you commit your changes in your dependency files before you push to Heroku.
I'm having trouble deploying my app to Heroku. I don't have this issue with an app I started several months ago so I think it must be something wrong with the lastest Angular Fullstack. After several hours of trouble shooting I decided to start from scratch just to see if AngularFullstack would deploy if you create a completely fresh app in an empty directory.
I created the app in the terminal with:
yo angular-fullstack
Without doing anything else I deployed the app to Heroku by typing this in the terminal:
yo angular-fullstack:heroku
Finally I went to the Heroku webaddress and I get the following "Application Error":
An error occurred in the application and your page could not be served. Please try again in a few moments.
If you are the application owner, check your logs for details.
When I look at the Heroku logs I get the exact same error I was getting in my finished project:
Error: ENOENT, no such file or directory '/app/dist/public/favicon.ico'
I've tried putting this file everywhere in my directory structure. There is no 'dist' in directory structure of the new app. I put this directory in the old app with grunt serve:dist but that doesn't fix the problem of locating favicon.ico even though it is there in the public folder. There is no 'app' directory at the top however and it begins looking all the way in my Mac 'User' path. I think this part of the problem that I don't know how to fix.
Has anyone tried deploying a Revel app using Dokku?
I tried "https://www.digitalocean.com/community/tutorials/how-to-use-the-dokku-one-click-digitalocean-image-to-run-a-go-app" and it deployed successfully.
However, when I try a new Revel app, it gives me this error
remote: mv: cannot stat `/build/app/.heroku/g/bin/*': No such file or directory
This is the .godir that I created:
myappname
This is the Procfile:
myappname
What am I doing wrong?
Thanks
Since Revel is a web app (receiving incoming HTTP traffic), you need to declare a web process type in your Procfile, i.e.:
web: myappname ## Procfile requires a Unix process declaration
This tells Dokku what command to run to start the web process on the server -- in this case myappname.go in your project root.
Leave off the .go file extension in the Procfile.
Dokku is a "Docker powered mini-Heroku" so Heroku's support docs are relevant:
The unix process model is a simple and powerful abstraction for running server-side programs. Applied to web apps, the process model gives us a unique way to think about dividing our workloads and scaling up over time. The Heroku Cedar stack uses the process model for web, worker and all other types of dynos.
-- from Process Types and the Procfile - Heroku Dev Center
Note that the standard Go Buildpack for Heroku/Dokku needs either a Godeps directory, or the deprecated method of including a .godir file.
You need to use the revel buildpack instead of the Go one. The buildpack will generate the Procfile for you.
Be sure to:
Add a .env file with this in your project: BUILDPACK_URL=https://github.com/revel/heroku-buildpack-go-revel.
Add a .godir file with the argument you use to run your app, e.g. github.com/yourcompany/yourrepo.
This is the first time I've used Heroku, and the fact that I can't find anyone in Google with a similar error to this means I'm likely doing something way wrong:
I'm following the basic Heroku setup guide here to get my NodeJS application deployed to the web. I'm deployed and trying to check my dynos with:
heroku ps:scale web=1
However, when I do this I get the error:
Scaling web dynos... failed
! No such process type web defined in Procfile.
When I run heroku ps I get nothing returned.
In my app's root directory, I have a file named Procfile (with no extension) which contains:
web: node app.js
The app runs locally without any issues (using foreman start).
Question is why is this occurring, how do I remedy it, should I even care?
Processes to be run on Heroku are defined in a simple text file called: Procfile
The Profile contains a line that defines how each of the processes in your application will run. This will be language specific and examples can be seen on the Heroku Devcenter Procfile article
Please note that the Procfile must be spelt exactly, with the first letter capitalized an all others lower case. There is no file extension for the Procfile. This Procfile should be placed in the root of your project and committed to your local git repository before doing a git push heroku master.
Should you mis-type the filename after it has been added to git, you can rename it using git with the command
git mv ProcFile Procfile
The renamed file will be staged so you can commit the changed file with the command
git commit -m "corrected name of Procfile"
I found the solution myself, from here: https://stackoverflow.com/a/7641259/556006
I had the same problem and I just now I found what was wrong. I first
accidently called the file ProcFile instead of Procfile. Simply
renaming that file did not get picked up by git. I had to do a git rm
ProcFile -f first and then add a new (correctly named) Procfile. After
that, it got pushed correctly by git and got picked up correctly by
Heroku.
I just had this issue myself, but in my case, I was missing a space between web: and the starting command in the Procfile.
For example, I had it wrong this way:
web:gunicorn run:app
Fixed it by adding a space after the colon:
web: gunicorn run:app
I am guessing you've never done git push heroku master -- that is, Heroku has never seen your code.
I had a php app on heroku with the default buildpack (apache), and then decided to change it to the php-fpm + nginx buildpack (https://github.com/iphoting/heroku-buildpack-php-tyler/).
I issued the change command:
heroku config:set BUILDPACK_URL=https://github.com/iphoting/heroku-buildpack-php-tyler.git
And pushed with:
git push heroku master
The slug then compiles, but all the binaries fail to execute with "command not found", because PATH config variable which should be updated with bin/release isn't updated.
In comparison, when creating an app from scratch with this buildpack with
heroku create -b https://github.com/iphoting/heroku-buildpack-php-tyler.git
Everything runs as expected (and PATH is present and updated).
My assumption is that bin/release was not run after changing the config variable BUILDPACK_URL, and therefore the PATH variable isn't set.
In order to make the app work, I had to manually add the PATH config variable. Did anybody else ever encounter this? Is this the expected behavior? By my understanding, bin/release should always run after a slug compile?
EDIT: corrected the git url to the correct ".git" one
You are correct in your assumption, the addons and config_vars properties of bin/release are only taken from a buildpack on an app's first deploy. See https://devcenter.heroku.com/articles/buildpack-api#binrelease for more details.
Heroku is moving over to a new system for a buildpack to add config vars that will work beyond an app's first deploy: https://devcenter.heroku.com/articles/labs-dot-profile-d
If a buildpack copies a .profile.d/buildpack_name.sh into the app, that file will be sourced during application boot. This can be used to set up things like the PATH.
You probably have a Procfile in your app repository. If you have an existing Procfile, then bin/release won't overwrite its contents. Simply copy the appropriate lines (5-9) from https://github.com/iphoting/heroku-buildpack-php-tyler/blob/master/bin/release into your Procfile.