Hi everyone! I am trying to deploy my Vue project to Heroku as I read that I can use JSON Server with Heroku but I’m stuck on how to go about it.
I first follow these steps:
but my app would fail and I would receive this in my console:
No default language could be detected for this app.
After some googling I decided to add the heroku/nodejs webpack to my project and now I get this in my console:
Building on the Heroku-20 stack
-----> Using buildpacks:
heroku/nodejs
GitHub - heroku/heroku-buildpack-static: Heroku buildpack for handling static sites and single page web apps
-----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/nodejs.tgz
! ERROR: Application not supported by ‘heroku/nodejs’ buildpack
!
! The ‘heroku/nodejs’ buildpack is set on this application, but was
! unable to detect a Node.js codebase.
!
! A Node.js app on Heroku requires a ‘package.json’ at the root of
! the directory structure.
!
! If you are trying to deploy a Node.js application, ensure that this
! file is present at the top level directory. This directory has the
! following files:
!
! bites-restaurant/
! README.md
!
! If you are trying to deploy an application written in another
! language, you need to change the list of buildpacks set on your
! Heroku app using the ‘heroku buildpacks’ command.
!
! For more information, refer to the following documentation:
! https:devcenter.heroku.com/articles/buildpacks
** ! htps://devcenter.heroku.com/articles/nodejs-support#activation
** More info: tps://devcenter.heroku.com/articles/buildpacks#detection-failure
! Push failed
Within bites-restaurant/ are all my files for my project but I’m not sure how to get into the folder and deploy my project from there. Here’s my project if you want to see my file structure:
I posted this over at the Vue.js forum and no bites. Any suggestions?
I have added a Procfile , a server.js, and added a “start”:“node server.json” to my package.json. I added heroku-buildpack-static and a static.json like it says here
I have also learned that
git subtree push --prefix bites-restaurant heroku main