Im trying to deploy on Heroku using command git push heroku master but I run into following issue :
click here to see error logs
ending logs
Below is error
NPM_CONFIG_LOGLEVEL=error
NODE_VERBOSE=false
NODE_ENV=production
NODE_MODULES_CACHE=true
Related
hello I'm trying to build my project for Heroku
I use React.js, Node.js and MongoDB
when I write those commands :
heroku login
git init
heroku git:remote -a whatsapp-clone5
git add .
git commit -am "make it better"
git push heroku main
This error appears to me
Heroku is likely not recognising the type of application you are pushing. Output of $ heroku logs would help diagnose the issue.
You might need to manually configure the buildpack
I'm trying to push my back-end and front-end with git push heroku HEAD:master and getting such error:
What causes this error?
Here you can check my package.json file:
I type:
git push heroku master
and I get:
The file package.json is present here
I've tried:
heroku buildpacks:set heroku/nodejs
And I still get the error.
This is the repo branch.
git push heroku [local branch name]:master
If I don't specify the local branch name. Heroku will automatically deploy from local master. That branch doesn't have a package.json file. That's why I got the error.
List item
I am trying to deploy a node - react app on heroku
If you are deploying your app as a node.js application you can run into this issue. Create your heroku app using the create-react-app buildpack:
https://elements.heroku.com/buildpacks/mars/create-react-app-buildpack
Hope this helps!
A 503 error code means the server cannot handle the request because it is either unresponsive or overloaded, as stated on MDN. This could be a result of incorrectly initializing the application on Heroku. Run the following in your directory from the terminal to deploy to heroku.
cd my-project
git init
heroku git:remote -a app-name
git add .
git commit -am "comment"
git push heroku master
More details about deploying a Node app to Heroku can be found here
I am trying to deploy my first Node+React (+MongoDB through Mongoose) application to Heroku, but when running the command git push heroku master, I am getting this error:
remote: Building source:
remote:
remote: ! No default language could be detected for this app.
remote: HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
remote: See https://devcenter.heroku.com/articles/buildpacks
remote:
remote: ! Push failed
remote: Verifying deploy...
The error indicates that Heroku is unable to recognize the language of my app. I guess it has something to do with my project structure and it looks I'll unfortunately need to re-organize it:
/root
/backend
- models
- node_modules
- ...
- package-lock.json
- package.json
/frontend
- node_modules
- public
- redux
- ...
- package-lock.json
- package.json
My guess is Heroku doesn't know what the entry point is. I'd recommend separating your backend and frontend apps into two separate heroku apps - it would simplify a lot. But if you want both in the same Heroku "app" I believe you'll have to setup a central node server in the root, and then direct all calls under /api to your backend, and all other calls to your /frontend (or however you want to structure that.
Here's a tutorial on Heroku that seems to walk you through what you're trying to do