-
Notifications
You must be signed in to change notification settings - Fork 710
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
Deploying to Heroku using Node.js not working? #627
Comments
If more information is required, link to repository can be found here: github.com/Meadowcottage/KaplanSays. The dist files was made in the order provided by the deploying to heroku using node.js recipe. I have checked the Heroku logs and the crash log returns the following:
I double checked the |
I don't use Heroku, but are you sure that |
I have been looking into this more and I found the issue. The Heroku app by default tries to build from the root directory. Makes sense about the no script error now 😂. |
If you see the very end of that recipe, it says that you should deploy only |
I don't have a huge total use time with Heroku, but from what I have been working out is that you can instead point it to a branch to deploy from. |
Yeah. In any case it appears that modifications to the recipe should be made. If you'd like to submit a PR once you get it working, that would be great. The simpler, the better. 😉 |
Port Configuration Solution: Update your server.js or equivalent file to listen on process.env.PORT, like this: js Solution: Ensure your package.json file includes: json
Solution: Create or verify the Procfile file in your root directory and include this: makefile
Solution: Check your Heroku logs to identify any uncaught errors. Run the following in your terminal: bash
Solution: Verify that all required environment variables are properly set in Heroku. You can set them using: bash Solution: In package.json, specify the required Node.js version like this: json
Solution: If necessary, set the Node.js buildpack explicitly by running: bash The database connection string is correctly set via environment variables. bash |
Been attempting to get a web app running on Heroku using NodeJS.
Used the provided recipe for setting it up: node-heroku .
However, the app builds correctly on Heroku, but when visiting the app page, it returns an application error.
Tested it with the configuration that I used and base configuration of all config options enabled(BDD & TDD). Still same issue.
Is it an issue with Heroku or the generator?
The text was updated successfully, but these errors were encountered: