Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'Couldn't find that process type' heroku node deployment

I'm getting 'Couldn't find that process type' when I try to do $ heroku ps:scale web=1. I looked at some other solutions that suggested to make sure my Procfile is spelled correctly and pushed correctly, which is.

This is the exact error I get:

    heroku ps:scale web=1
Scaling dynos... !
 ▸    Couldn't find that process type.
Error: ENOENT: no such file or directory, open '/Users/XXXXXX/.cache/heroku/error.log'
    at Object.fs.openSync (fs.js:584:18)
    at Object.fs.writeFileSync (fs.js:1316:33)
    at Object.fs.appendFileSync (fs.js:1362:6)
    at log (/usr/local/Cellar/heroku/6.6.7/libexec/node_modules/heroku-cli-util/lib/errors.js:87:6)
    at handleErr (/usr/local/Cellar/heroku/6.6.7/libexec/node_modules/heroku-cli-util/lib/errors.js:102:9)
    at process._tickCallback (internal/process/next_tick.js:109:7)
like image 763
Amir Mousavi Avatar asked May 16 '17 21:05

Amir Mousavi


2 Answers

I found out what the problem was, in my project, I wasn't pushing to the master branch, and I was performing the wrong git code. So the correct way to push to Heroku if you are working on a different branch is the following:

git push heroku <branch_name>:master
like image 188
Amir Mousavi Avatar answered Sep 21 '22 22:09

Amir Mousavi


Although the following answer is for Rails, it can certainly apply to any framework.

The app deployment logs are supposed to list these default types:

Default types for buildpack -> console, rake, web, worker

(this log is displayed when you run git push, you can also find them in the Activity feed of your Heroku dashboard)

If this line (or something similar) is not present, this might be due to the buildpacks of your app. You can list them with:

$ heroku buildpacks --app myapp
=== myapp Buildpack URLs
1. heroku/ruby
2. https://github.com/some/buildpack.git

In this example, heroku/ruby comes first, which might sounds legit. But it seems that the last buildpack cancels the types created by heroku/ruby. To fix this, make sure this buildpack comes last. You can achieve this with buildpacks:remove and buildpacks:add --index:

$ heroku buildpacks:remove https://github.com/some/buildpack.git --app myapp
$ heroku buildpacks:add --index 1 https://github.com/some/buildpack.git --app myapp
$ heroku buildpacks --app myapp
=== myapp Buildpack URLs
1. https://github.com/some/buildpack.git
2. heroku/ruby

Deploy the app again with git push, and it is now possible to start web and worker processes.

like image 28
philippe_b Avatar answered Sep 25 '22 22:09

philippe_b