I created a simple Node.js app following the tutorial offered by Heroku. When I try to run the command heroku ps:scale worker=1 from within the application folder I get the following error message:
Scaling worker dynos... failed
! Resource not found
Any ideas what the problem may be? I checked my app's dashboard on Heroku and the commit is there and also a Dyno is allocated. The Procfile is identical to the one in the tutorial.
Are you sure you have a worker process defined in your procfile? The node tutorial doesn't have you add one I don't think. Try heroku ps:scale web=1 instead.
Related
This is my file tree containing a folder for my Vue app (client folder) and my NodeJS server (server folder).
When I try uploading to Heroku, I get an error saying that no matching buildpacks could be found, and that's I believe due to my source folder not having a package.js and that being because I have one in the client and server folders.
So how can I accomplish deploying both my client and server-side in one Heroku app, or would I need to split my whole app in one Heroku Front-End App and one Heroku Back-End App?
I'm sorry for such a stupid question, but I am really confused on how to put my app live, since it's finally finished after a month of work.
No Buildpack found while deploying to Heroku .. When I try uploading to Heroku, I get an error saying that no matching buildpacks could be found, and that's I believe due to my source folder not having a package.js
Correct, this error "no buildpack found" happens because Heroku looks at (only) your root directory and cannot determine what language/framework you are using.
The package.json file defines the dependencies that should be installed with your application. To create a package.json file for your app, run the command npm init in the root directory of your app.
https://devcenter.heroku.com/articles/deploying-nodejs#declare-app-dependencies
I'd recommend reading the heroku node docs and deploying a "hello world" application first, as a learning experience. You'll also want to read about the Procfile.
Deploying a client-server application to Heroku is quite common, all rails apps work this way (a single deploy). But, for node apps, there are many different ways to deploy, and there is no official (documented) way to organize your code, AFAIK.
I have a node.js RESTful API that is using Apache CouchDB for it's NoSQL database. I am new to Heroku and just deployed my API to Heroku instance. However, the startup failed because it couldn't connect to CouchDB. I have researched how to setup CouchDB on Heroku but haven't found anything that works.
I found this buildpack but it doesn't exist any longer: https://elements.heroku.com/buildpacks/aindeev/heroku-buildpack-couchdb
I found this stack overflow post but there doesn't look to be a solution provided: Host couchdb on heroku
Can someone help provide me with some instructions on how I can host couchdb on heroku?
If you are at the step of creating an app you can do the following
heroku create --buildpack https://github.com/creativegeekjp/heroku-buildpack-couchdb.git
and thereby create the app with the couchdb buildpack installed.
however if you already have the app what you can do is
heroku config:add BUILDPACK_URL="https://github.com/creativegeekjp/heroku-buildpack-couchdb.git" -a YOUR_APP
The -a YOUR_APP is optional, you probably don't need it considering you're probably in a folder you've initialized as a heroku app when you add the buildpack.
Or the easier
heroku buildpacks:set https://github.com/creativegeekjp/heroku-buildpack-couchdb.git
after which you have to run
git push heroku master
to deploy your buildpack
I built a Meteor app, and it runs on my local machine, where I have meteor installed.
I have never deployed an app online, and am trying to put the app on heroku.
I first tried to use buildpack/jordansissel/heroku-buildpack-meteor.git, but I got an error "Meteor requires Node v0.10.41 or later"
I then tried to use buildpack/michaltakac/meteor-buildpack-horse.git but it failed to push because it couldn't unpack Node.
Lastly I've tried kevinseguin/heroku-buildpack-meteor.git but I get lots of warnings about npm depricated http://prntscr.com/bewzak
When I look at the logs it says "Slug compilation failed: failed to compile Node.js app"
I also get Error: MONGO_URL must be set in environment
I don't know enough to understand what the errors are, or how to get my app deployed
Image of errors: http://prntscr.com/bex0av
my goal it to get the site on gr-fireworks.herokuapp.com
I contacted Heroku helpdesk and they said they couldn't help me because the issue was outside the scope of Heroku Support.
I tried to reach out to Snap CI who said they were successful in deploying it, but when I try to type in exactly what they did, I am still getting the error about Node https://snap-ci.com/ankitsri11/Fireworks/branch/master/logs/defaultPipeline/1/Heroku?back_to=build_history
My repository I'm trying to deloy is on git at github.com/jschwarzwalder/Fireworks
From description of your problem I can conclude you need to do 2 things on your app's Heroku dashboard (Settings tab):
Add MONGO_URL environment variable that points to your Mongo DB database. You can create mongo instance on external service or use mLab Heroku addon (it has free plan).
So your environment variables may look like:
Also, you may need to add METER_SETTINGS if you use --settings settings.json and ROOT_URL - URL of you app gr-fireworks.herokuapp.com (is required).
Set this buildpack:
Ensure you have .git at the end of url.
Now you can deploy your app using single command (if you setup Heroku Toolbelt and heroku remote points Heroku's app repository):
$ git push heroku master
I am trying to host my Express JS app on Heroku, I have uploaded it on my gitHub repo and associated it with my heroku account. I created the Procfile with content
web: node app.js
But when I go to my application link on Heroku it gives Application Error.
What I am doing wrong? Do I need to give my index.js instead of app.js?
I upgraded my git to 2.3.0 and now the logs are coming in. It seems the issue was that no web dynos were running.
I went in my terminal and did
heroku logs --app myappname
heroku ps:scale web=1 --app myappname
and now the application is working
I have a procfile:
web: node index.js
When I run "heroku scale web=1" I get the error Scaling web processes... Record not found. I can't find any explanation of this error or what might cause it, but as far as I can tell it means heroku scale couldn't find a "web" entry in the procfile it attempts to use.
I've deployed my app, I can run heroku run node index.js on the server and see no errors. I can run foreman start locally and it starts up a fully functioning instance of my app.
As far as I can tell it seems that the heroku scale command just isn't seeing the contents of my procfile (and I know the deployed version is identical to my local version - I checked with heroku run nano index.js).
Any help would be greatly appreciated, I just want to resolve how to get heroku scale web=1 working for me.
And the answer is... heroku uses a case sensitive filesystem and expects "Procfile", not "procfile". Locally I have a case insensitive filesystem and so I can run foreman start just fine.
Changing the file to Procfile and doing another push resolved the problem and I was able to run heroku scale web=1 without further issue.
If you have not pushed your Procfile to Heroku, it cannot find it to use the scale command.
Check if there is a space between web and your node command in the Procfile. I don't know it is weird.
I got the same issue, I added a space and re-committed. It worked.
web: node test.js
I also experienced the issued caused by a lowercase 'procfile', however simply renaming the file did not get recognized by git. The solution is explained here:
https://stackoverflow.com/a/7641259/1203226
Watch out for local-specific things that might break down at Heroku's servers.
One example was already given: Procfile is case-sensitive.
Another one that I have experienced is the presence of symbolic links to files outside of the repo. After fixing that the "Record not found" problem was gone.
You first need to start your app with the foreman gem:
$ gem install foreman
$ foreman start
Then you can scale your node app:
heroku ps:scale web=1