frankcollins3 / fill_container

codecamp team project updated with new icon screen menu + puppeteer icon search, GraphQL, redux, relational psql !mongo, and accuweatherAPI
1 stars 0 forks source link

heroku rejected deployment [10:30pm] #272

Closed frankcollins3 closed 1 year ago

frankcollins3 commented 1 year ago

attempting to do: separate concerns. heroku postgres connection string already works in local. plan is to deploy on azure with heroku PSQL. right now separating those concerns by doing the full deployment with heroku

error: Screen Shot 2023-07-05 at 10 25 45 PM

Screen Shot 2023-07-05 at 10 24 34 PM

proposed approach: 0: this is what chat suggested by I went to the heroku dashboard, and, as pictured above, it sets no framework detected

Screen Shot 2023-07-05 at 10 28 18 PM

1: determine the framework heroku can expect by setting that up in the dashboard I believe. (as part of general assembly bootcamp we deployed on then free-tier-heroku with react, ejs, postgres, sequelize)

frankcollins3 commented 1 year ago

👎 wasn't reading closely enough and thought buildpack would've been like webpack/build add-ons. wrong. Screen Shot 2023-07-06 at 12 01 27 AM

Screen Shot 2023-07-06 at 12 01 20 AM

[12:02am]

frankcollins3 commented 1 year ago

set buildpack to be nodejs. Iterm is mentioning using some type of buildpack command. Screen Shot 2023-07-06 at 12 07 38 AM

[12:07am]

chat: Apologies for the confusion earlier. It seems that the buildpack detection is still not working as expected. To resolve this issue, you can try setting the buildpack explicitly using the Heroku CLI command heroku buildpacks:set.

In your case, since you want to use the Node.js buildpack, you can run the following command in your project directory:

bash Copy code heroku buildpacks:set heroku/nodejs This command will explicitly set the Node.js buildpack for your application. Once you've set the buildpack, try deploying your application to Heroku again using git push heroku main.

Make sure you have a package.json file in the root of your project, as it is required for deploying a Node.js application on Heroku. If you don't have one, create it with the necessary dependencies and scripts.

If you continue to encounter issues, please share the contents of your package.json file so that I can help you further.

terminal: ➜ waterapp git:(main) ✗ heroku buildpacks:set heroku/nodejs

› Error: The buildpack heroku/nodejs is already set on your app. ➜ waterapp git:(main) ✗

[12:17am]

frankcollins3 commented 1 year ago

wondering if the procfile, which lives in main root and has only these statements: web: npm start

release: npx prisma migrate deploy


wondering if that ^ above procfile ^ is clashing / having no compatibility with package.json scripts:

"scripts": {
    "server": "nodemon --quiet server",
    "client": "npm start --prefix client",
    "build": "npm run build --prefix client && prisma generate",
    "dev": "concurrently \"npm run server\" \"npm run client\"",
    "start": "concurrently \"npm run server\" \"npm run client\""
},

[1:50am]

frankcollins3 commented 1 year ago

deferring to human input > chatGPT https://stackoverflow.com/questions/38658038/why-does-heroku-fail-to-detect-node-js-buildpack [1:53am]

clearing builpacks with stackoverlfow suggested: heroku buildpacks:clear [1:58pm]

git show master:package.json [1:59pm]

frankcollins3 commented 1 year ago

Heroku is officially proceeding through build stage without rejecting the deployment. 👎 Failing over a module issue though.

Screen Shot 2023-07-06 at 2 37 23 AM