angular-fullstack / generator-angular-fullstack

Yeoman generator for an Angular app with an Express server
https://awk34.gitbook.io/generator-angular-fullstack
6.13k stars 1.24k forks source link

Heroku deployment issue #1670

Open l3lackcat opened 8 years ago

l3lackcat commented 8 years ago

Hi,

I have deployed my application on heroku but I got the error page "Application Error" and "Failed to load resource: the server responded with a status of 503 (Service Unavailable)" on Developer Tool.

I also see this error on the demo application.

http://fullstack-demo.herokuapp.com/

codeofsumit commented 8 years ago

I get the same problem.

Also, the readme says I should use grunt (or gulp i guess) to push my updated to heroku. That doesn't seem to be working for me.

gazzwi86 commented 8 years ago

I'm finding that when you are using gulp, deploying to heroku is always failing, even on a clean build. It appears to be missing the grunt build on line 119 of file https://github.com/angular-fullstack/generator-angular-fullstack/blob/5ba969bc2b163eaa5118b520972b7906209f0541/heroku/index.js

It also appears to be missing the grunt buildcontrol:heroku task, again as its using gulp. To my understanding this creates a commit on the heroku repository and pushes. This could easily be replicated with gulp-git, no?

Output logged below for yo angular-fullstack:heroku:

$ yo angular-fullstack:heroku
? Name to deploy as (Leave blank for a random name): 
? On which region do you want to deploy ? US

Initializing deployment repo
(!) #mkdir() is deprecated. Use mkdirp module instead. https://www.npmjs.com/package/mkdirp
Initialized empty Git repository in /Users/gazzwi86/Sites/app/dist/.git/

Creating heroku app and setting node environment
https://safe-citadel-44449.herokuapp.com/ | https://git.heroku.com/safe-citadel-44449.git

NODE_ENV: production

stdout: https://safe-citadel-44449.herokuapp.com/ | https://git.heroku.com/safe-citadel-44449.git
NODE_ENV: production

Creating Procfile

Building dist folder, please wait...
grunt-cli: The grunt command line interface. (v0.1.13)

Fatal error: Unable to find local grunt.

If you're seeing this message, either a Gruntfile wasn't found or grunt
hasn't been installed locally to your project. For more information about

installing and configuring grunt, please see the Getting Started guide:

http://gruntjs.com/getting-started

Adding files for initial commit
On branch master

Initial commit

nothing to commit

Re-pushing the existing "dist" build...

Uploading your initial application code.
 This may take several minutes depending on your connection speed...
✖ { [Error: Command failed: git push -f heroku master
error: src refspec master does not match any.
error: failed to push some refs to 'https://git.heroku.com/safe-citadel-44449.git'
]
  killed: false,
  code: 1,
  signal: null,
  cmd: 'git push -f heroku master' }
   create dist/Procfile
mupakoz commented 8 years ago

@gazzwi86 I managed to overcome this problem by running the command line as administrator (I'm on windows)

Awk34 commented 8 years ago

@gazzwi86 the issue you are talking about should be fixed in the latest version

gazzwi86 commented 8 years ago

@Awk34 thanks!

l3lackcat commented 8 years ago

@Awk34 Many thanks!!!

Awk34 commented 8 years ago

Can you test 3.7.0-beta.2?

Sandeep3005 commented 6 years ago

Hi guys, did anyone find solution to this problem yet ?