Skip to content

503 on heroku #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mathieutu opened this issue Oct 8, 2018 · 9 comments
Closed

503 on heroku #1

mathieutu opened this issue Oct 8, 2018 · 9 comments
Labels
bug Something isn't working

Comments

@mathieutu
Copy link
Owner

vuejs/vue-cli#2533 (comment) from @NataliaTepluhina

@mathieutu for some reason the sequence of yarn build + yarn express:run works perfectly on localhost but results in 503 on Heroku (start script is yarn express:run)

@designbuedchen
Copy link

Any solution to that?

I even did this, nothing helps...

"scripts": {
   "serve": "./node_modules/.bin/vue-cli-service serve",
   "build": "./node_modules/.bin/vue-cli-service build",
   "express": "./node_modules/.bin/vue-cli-service express:watch",
   "express:run": "./node_modules/.bin/vue-cli-service express:run",
   "start": "./node_modules/.bin/vue-cli-service express:run",
   "heroku-prebuild": "yarn global add @vue/cli-service-global && yarn global add @vue/cli",
   "heroku-postbuild": "yarn build"
 },

@mathieutu
Copy link
Owner Author

mathieutu commented Mar 13, 2019

Ok, so we do have confirmation now.
Do you have some logs to share?

@mathieutu mathieutu added the bug Something isn't working label Mar 13, 2019
@designbuedchen
Copy link

Sure, here we go:

2019-03-13T08:42:38.000000+00:00 app[api]: Build started by user [email protected]
2019-03-13T08:44:33.573920+00:00 app[api]: Deploy XXXX by user [email protected]
2019-03-13T08:44:33.573920+00:00 app[api]: Release v20 created by user [email protected]
2019-03-13T08:44:34.938453+00:00 heroku[web.1]: State changed from crashed to starting
2019-03-13T08:44:38.209283+00:00 heroku[web.1]: Starting process with command `npm start`
2019-03-13T08:44:41.390727+00:00 heroku[web.1]: State changed from starting to crashed
2019-03-13T08:44:41.371688+00:00 heroku[web.1]: Process exited with status 1
2019-03-13T08:44:41.252180+00:00 app[web.1]: 
2019-03-13T08:44:41.252204+00:00 app[web.1]: > [email protected] start /app
2019-03-13T08:44:41.252206+00:00 app[web.1]: > vue-cli-service express:run
2019-03-13T08:44:41.252207+00:00 app[web.1]: 
2019-03-13T08:44:41.277492+00:00 app[web.1]: sh: 1: vue-cli-service: not found
2019-03-13T08:44:41.284599+00:00 app[web.1]: npm ERR! file sh
2019-03-13T08:44:41.284786+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2019-03-13T08:44:41.284919+00:00 app[web.1]: npm ERR! errno ENOENT
2019-03-13T08:44:41.289830+00:00 app[web.1]: npm ERR! syscall spawn
2019-03-13T08:44:41.291854+00:00 app[web.1]: npm ERR! [email protected] start: `vue-cli-service express:run`
2019-03-13T08:44:41.292124+00:00 app[web.1]: npm ERR! spawn ENOENT
2019-03-13T08:44:41.292498+00:00 app[web.1]: npm ERR! 
2019-03-13T08:44:41.292860+00:00 app[web.1]: npm ERR! Failed at the [email protected] start script.
2019-03-13T08:44:41.293184+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2019-03-13T08:44:41.303626+00:00 app[web.1]: 
2019-03-13T08:44:41.303737+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2019-03-13T08:44:41.303808+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2019-03-13T08_44_41_295Z-debug.log
2019-03-13T08:44:41.000000+00:00 app[api]: Build succeeded

So it seems vue-cli-service is not available on heroku – even with global preinstall of @vue/cli

@designbuedchen
Copy link

Is there a way to start the express server with something like direct node-cli? I really love the way this plugin is working with the vue-cli-service, but I think there is no way to use it on heroku this way... :-(

@mathieutu
Copy link
Owner Author

Ok, I understand now.
vue-cli-service is in devDependencies.

Did you try passing it as a dependency?

Yeah, a full refactoring is planed, using serve-my-app package, and so it will not be linked to vue-cli-service anymore.

@designbuedchen
Copy link

The serve-my-app sounds promising. I will give it a try with the dependency.

@designbuedchen
Copy link

I can confirm that it works now. But looking forward to the refactoring with serve-my-app – big respect to your work anyway!!!!

@mathieutu
Copy link
Owner Author

Thanks! It's a real pleasure!
🤗

@mathieutu
Copy link
Owner Author

Doc updated in cc70895.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants