Skip to content

Deploying to Heroku with github #1143

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
eyamnitsky opened this issue Mar 23, 2016 · 4 comments
Closed

Deploying to Heroku with github #1143

eyamnitsky opened this issue Mar 23, 2016 · 4 comments

Comments

@eyamnitsky
Copy link

Environment Setup & Steps to repro

I have a vanilla parse-server deployed to Heroku with "heroku button" - everything runs well.
Then, I make a benign change (add a space) to test deployment to Heroku with Git (from within the Heroku interface).
The Build completes successfully, and Heroku says the app has been deployed. However it crashes with the log below.
I don't understand why push from github to Heroku works flawlessly, while running deploy from Heroku fails.
I reviewed a similar issue, and the proposed resolution was to add "lib" and "node_modules" folders to git repo. I did that but no luck - exactly same error.

Logs/Trace

2016-03-23T02:49:44.604316+00:00 heroku[web.1]: State changed from crashed to starting
2016-03-23T02:49:44.603173+00:00 heroku[web.1]: State changed from starting to crashed
2016-03-23T02:49:44.603768+00:00 heroku[web.1]: Process exited with status 1
2016-03-23T02:49:46.996934+00:00 heroku[web.1]: Starting process with command npm start
2016-03-23T02:49:49.975466+00:00 app[web.1]:
2016-03-23T02:49:49.975491+00:00 app[web.1]: > [email protected] start /app
2016-03-23T02:49:49.975492+00:00 app[web.1]: > node ./bin/parse-server
2016-03-23T02:49:49.975492+00:00 app[web.1]:
2016-03-23T02:49:50.039028+00:00 app[web.1]: module.js:341
2016-03-23T02:49:50.039062+00:00 app[web.1]: throw err;
2016-03-23T02:49:50.039063+00:00 app[web.1]: ^
2016-03-23T02:49:50.039064+00:00 app[web.1]:
2016-03-23T02:49:50.039065+00:00 app[web.1]: Error: Cannot find module '../lib/cli/parse-server'
2016-03-23T02:49:50.039065+00:00 app[web.1]: at Function.Module._resolveFilename (module.js:339:15)
2016-03-23T02:49:50.039066+00:00 app[web.1]: at Function.Module._load (module.js:290:25)
2016-03-23T02:49:50.039069+00:00 app[web.1]: at Object.Module._extensions..js (module.js:422:10)
2016-03-23T02:49:50.039069+00:00 app[web.1]: at Module.load (module.js:357:32)
2016-03-23T02:49:50.039067+00:00 app[web.1]: at Module.require (module.js:367:17)
2016-03-23T02:49:50.039067+00:00 app[web.1]: at require (internal/module.js:16:19)
2016-03-23T02:49:50.039070+00:00 app[web.1]: at Function.Module._load (module.js:314:12)
2016-03-23T02:49:50.039068+00:00 app[web.1]: at Object. (/app/bin/parse-server:3:1)
2016-03-23T02:49:50.039070+00:00 app[web.1]: at Function.Module.runMain (module.js:447:10)
2016-03-23T02:49:50.039068+00:00 app[web.1]: at Module._compile (module.js:413:34)
2016-03-23T02:49:50.049080+00:00 app[web.1]:
2016-03-23T02:49:50.059103+00:00 app[web.1]: npm ERR! npm v3.7.3
2016-03-23T02:49:50.057591+00:00 app[web.1]: npm ERR! Linux 3.13.0-79-generic
2016-03-23T02:49:50.059248+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2016-03-23T02:49:50.058081+00:00 app[web.1]: npm ERR! argv "/app/.heroku/node/bin/node" "/app/.heroku/node/bin/npm" "start"
2016-03-23T02:49:50.059444+00:00 app[web.1]: npm ERR! [email protected] start: node ./bin/parse-server
2016-03-23T02:49:50.058333+00:00 app[web.1]: npm ERR! node v5.8.0
2016-03-23T02:49:50.059545+00:00 app[web.1]: npm ERR! Exit status 1
2016-03-23T02:49:50.059836+00:00 app[web.1]: npm ERR!

Please advise!

@steven-supersolid
Copy link
Contributor

It does sound similar to issue #1120 but you say you added those files.

Is your project a fork of parse-server or do you include parse-server as a dependency in your package.json?

@eyamnitsky
Copy link
Author

I'm not sure if it is similar to #1120. I found the suggestions to add lib and node_modules in #472. Still didn't work.
I'm wondering what are the differences between running build&deploy from Heroku Deploy interface vs. the Heroku button from within the git repo (which works).

@flovilmart
Copy link
Contributor

did you remove lib from the gitignore, and add -f the ./lib folder to git before pushing?

@hramos
Copy link
Contributor

hramos commented Apr 2, 2016

You may use Server Fault for questions about managing Parse Server.

For code-level and/or implementation-related questions or technical support, please refer to Stack Overflow.

@hramos hramos closed this as completed Apr 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants