2

Following this tutorial to get Angular hosted on Herouku: https://medium.com/@ervib/deploy-angular-4-app-with-express-to-heroku-6113146915ca

And I get an error when trying to push to Heroku. Looked through several posts with similar problems and nothing worked.

Error message:

$ git push heroku master
Counting objects: 40, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (36/36), done.
Writing objects: 100% (40/40), 73.70 KiB | 0 bytes/s, done.
Total 40 (delta 1), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> App not compatible with buildpack: https://github.com/heroku/heroku-buildpack-nodejs#v83
remote:        More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !   Push rejected to XXXXXXXXXXXX.
remote:
To https://git.heroku.com/XXXXXXXXXXXX.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/XXXXXXXXXXXX.git'

Here's my file structure, root of the folder:

enter image description here

Package.json

{
  "name": "webapp",
  "version": "0.0.0",
  "license": "MIT",
  "main": "app.js",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "postinstall": "grunt ng build --aot -prod"
  },
  "engines": {
    "node": "~6.10.3",
    "npm": "~3.10.5"
  },
  "private": true,
  "dependencies": {
    "@angular/cli": "1.0.3",
    "@angular/animations": "^4.2.4",
    "@angular/compiler-cli": "^4.0.0",
    "@angular/common": "^4.2.4",
    "@angular/compiler": "^4.2.4",
    "@angular/core": "^4.2.4",
    "@angular/forms": "^4.2.4",
    "@angular/http": "^4.2.4",
    "@angular/platform-browser": "^4.2.4",
    "@angular/platform-browser-dynamic": "^4.2.4",
    "@angular/router": "^4.2.4",
    "core-js": "^2.4.1",
    "rxjs": "^5.4.2",
    "zone.js": "^0.8.14"
  },
  "devDependencies": {
    "@angular/cli": "1.3.2",
    "@angular/compiler-cli": "^4.2.4",
    "@angular/language-service": "^4.2.4",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "~3.1.1",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "karma": "~1.7.0",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "ts-node": "~3.2.0",
    "tslint": "~5.3.2",
    "typescript": "~2.3.3"
  }
}
Kyle Krzeski
  • 6,183
  • 6
  • 41
  • 52
runningraptor
  • 339
  • 1
  • 6
  • 19
  • Possible duplicate of [Why does Heroku fail to detect Node.js buildpack?](https://stackoverflow.com/questions/38658038/why-does-heroku-fail-to-detect-node-js-buildpack) – GreyBeardedGeek Aug 27 '17 at 04:36
  • Thanks for the suggestion, but it didn't solve my problem. I will give it another try by starting from scratch and will update my question or mark it a duplicate if starting over and the suggested original solves my problem. – runningraptor Sep 07 '17 at 23:38

0 Answers0