deploying is failed in heroku with nodejs - node.js

Error message
App not compatible with buildpack: https://github.com/Murali5665/tinderclone-1
bash: /tmp/codon/tmp/buildpacks/6808d9bafd7cf888affdcbfa3b24d7368d0a7618/bin/detect: No such file or directory

You have told Heroku to use your app's source code as a buildpack.
A buildpack is a very specific thing:
Buildpacks are responsible for transforming deployed code into a slug, which can then be executed on a dyno. Buildpacks are composed of a set of scripts, and depending on the programming language, the scripts will retrieve dependencies, output generated assets or compiled code, and more. This output is assembled into a slug by the slug compiler.
Heroku’s support for Ruby, Python, Java, Clojure, Node.js, Scala, Go and PHP is implemented via a set of open source buildpacks.
It is uncommon to provide your own custom buildpack, and your source code is not valid as a buildpack.
Clear your configured buildpack:
heroku buildpacks:clear
Then deploy again. Heroku will see your package.json and automatically select the Node.js buildpack.

Related

I set the heroku node.js buildpack, but the prompt still says push rejected coz failed to detect set

I want to deploy a node.js application onto the heroku through github, and I followed the instructions on heroku. but I stuck on the issue which says the push rejected because of the buildpacks are not set,however I did set the nodejs buildpack, I am a noob, I don't know what the problem it is.someone says package.json should contain engine:node version, is that the reason? because I have put the front-end folder and back-end folder separately. so what should the folder structure looks like?
heroku cli capture

Using Grunt on Heroku without defiling devDependencies

I understand, in general, the most frequent way Grunt is used on Heroku -- load the buildpack, specify your grunt heroku task(s), and include any Grunt plugins you want to use on the Heroku dyno in your package.json:dependencies.
However, I find this to be a rather poor solution, because it miscommunicates about my app. My Grunt plugins are all more like devDependencies, as I will only run anything with Grunt one time (per deploy). My app doesn't directly depend on them to run, as it's mostly minification and template compilation.
I'm also trying to keep compiled files (e.g. .css and .html files when I'm writing in Sass and Handlebars) out of source control, so pushing them over from Github is possible but definitely not what I want.
Is there a way to do all of the following?
exclude .css and .html files from Git
write stylesheets and markup using Sass and Handlebars
push a basic Express app containing these files to Heroku
have Heroku run a server-relative version of my grunt build task (naming it whatever is necessary is fine) to compile and prepare all of the views and assets before launching the web: process
have Heroku's Grunt task intelligently understand that I just want some pre-launch compilation so it will look at devDependencies and install the relevant ones in a perhaps-temporary kind of way
launch the Express server via the web: process
I'm fine with having to write my own buildpack, or whatever needs to be done to do this (what I perceive to be) the right way.
I created the buildpack heroku-buildpack-webapp-client that supports grunt, compass/sass and installs your devDependencies. Maybe you can use this one or have a look at the bin/compile script to see how it works.

Heroku detects Clojure app as Node.js one

Heroku detects app type by presence of files like package.json or project.clj.
I am trying to build Clojure app, so I have project.clj in my root directory. But I also use some node.js tools, so I have package.json too.
Is there a way to tell Heroku what kind of app I build, but keep package.json?
Create a .slugignore file with the contents package.json and Heroku will not see that file, even though it will be in your git archive.

Forcing Heroku to Treat App as Node.js

I have a Node.js app which I'm attempting to deploy to Heroku. However, Heroku seems to think that it's a Ruby app, likely because it has a Gemfile (we have a private gem containing some custom scripts and the like, as well as the Heroku gem itself for command-line control). I added Gemfile and Gemfile.lock to the .slugignore (discussed in Heroku's Slug Compiler article), but the app is still detected as a Ruby app.
$ git push heroku master
Total 0 (delta 0), reused 0 (delta 0)
-----> Heroku receiving push
-----> Ruby app detected
-----> Installing dependencies using Bundler version 1.2.0.pre
Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
The bundle fails, because our custom gem is a private repo, and I never get any further. I'm unable to find any way to force Heroku to treat the app as a Node.js app and use the Procfile to start the web app. Does anyone have and idea how I can do this?
Well crap, I must not have looked far enough. This was already asked on Stack Overflow and the answer was to use the custom Node.js build pack, a la:
heroku config:add BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-nodejs.git

Changing app from one language to another in heroku

Is it possible to switch a Heroku app on the Cedar stack from one language to another?
In this particular instance I am trying to migrate an app from PHP to NodeJS, which is being detected as a NodeJS app after performing a git push:
-----> Heroku receiving push
-----> Node.js app detected
-----> Fetching Node.js binaries
-----> Vendoring node 0.4.7
-----> Installing dependencies with npm 1.0.94
Dependencies installed
-----> Discovering process types
Procfile declares types -> web
-----> Compiled slug size is 5.0MB
-----> Launching... done, v7
... however it then crashes with:
Error: No such file or directory - node main.js
Trying to run the Node REPL also suggests the binary doesn't exist:
> heroku run node
Running node attached to terminal... up, run.1
sh: node: not found
Is there any way to reinitialise a Cedar stack app, without creating a new instance?
Create a new instance application instance. It is probably not a good idea to try to morph one into the other. DNS will update for you automatically as that's handled by the routing mesh, and you'll be much happier and better off for it.
I (although a slightly different use case) migrated an application from Bamboo to Cedar and the whole process took me less than five minutes. The only downtime was a couple of seconds while I relocated the custom domain setup on the application.
I know it's an old question but I ran into this problem changing my app from PHP to NodeJs. The first time I run the git push heroku master I got an error saying that it couldn't use PHP buildpack.
So I went in my app Settings tab in Heroku dashboard and remove the PHP buildpack from the Buildpacks list.
Finally whe I ran git push heroku master, Heroku auto detected the NodeJS buildpack.

Resources