I also had this problem. First I added āenginesā in the package.json file cause I thought it will solve the problem, but it didnāt.
example: āenginesā:{ānodeā: āv14.17.5ā, ānpmā: ā7.24.2ā}
then, I tried to remove the authorās name (which is a huge problem on my part because I am not the original Author of the app. Itās kind of piracy for me, not putting the real author.).
But the deployment worked after I removed the original author āRaphael Terrier @R4ph-tā 's name in the package.json file. I didnāt add my name so itās authorless, sorry Raphael.
(I donāt know if this problem was herokuās end or my githubās securityās end). Just sharing my thoughts.
Iām experiencing this issue as well, for the server (havenāt yet deployed client). Iāve removed the author name, to no avail. And, my fork does not include require(ādotenvā).config();. Not sure whatās happening. Iāve also tried both a yarn.lock and package-lock.json, still hitting the Heroku application error. See the repo here: GitHub - amunrarara/odyssey-lift-off-part5-server: Odyssey Lift-off V - Server - Course Companion App
Hereās my logs:
2022-04-06T11:04:38.902679+00:00 app[web.1]: at Object.<anonymous> (/app/src/index.js:25:1)
2022-04-06T11:04:38.902679+00:00 app[web.1]: at Module._compile (node:internal/modules/cjs/loader:1103:14)
2022-04-06T11:04:38.902680+00:00 app[web.1]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
2022-04-06T11:04:38.902680+00:00 app[web.1]: at Module.load (node:internal/modules/cjs/loader:981:32)
2022-04-06T11:04:38.902680+00:00 app[web.1]: at Function.Module._load (node:internal/modules/cjs/loader:822:12)
2022-04-06T11:04:39.102082+00:00 heroku[web.1]: Process exited with status 1
2022-04-06T11:04:39.973504+00:00 heroku[web.1]: State changed from starting to crashed
2022-04-06T11:04:41.090754+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=apollo-odyssey-tutorial.herokuapp.com request_id=ff7d7c20-351f-4306-8ea7-acabf4ca3d52 fwd="73.11.15.74" dyno= connect= service= status=503 bytes= protocol=https
2022-04-06T11:04:41.964284+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=apollo-odyssey-tutorial.herokuapp.com request_id=7bc63974-e0a9-44f4-a97f-6e3ec9a69155 fwd="73.11.15.74" dyno= connect= service= status=503 bytes= protocol=https
2022-04-06T11:06:03.416209+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=OPTIONS path="/" host=apollo-odyssey-tutorial.herokuapp.com request_id=8d627485-cf9e-463d-a918-36e0a2e692d0 fwd="73.11.15.74" dyno= connect= service= status=503 bytes= protocol=https
Hello @amunrarara , have you added the environment variables to your app in the heroku dashboard? If so, could you please paste here the key names (like APOLLO_KEY, not the values) you used?
Thank you!
It seems that, by removing APOLLO_GRAPH_VARIANT, the app properly builds!
I used this environment variable because it was stated in your tutorial. But, I wasnāt provided the value by Apollo Studio when I registered the schema, I copied that key/value from the tutorial directly.
Also to note, Apollo Studio says here āā¦four environment variablesā, but only gives three. This increased my belief that I needed the additional variable showed in the tutorial.
Thanks for sending that over @amunrarara .
The snippets with variables in studio changed since we created the tutorial.
APOLLO_GRAPH_REF in now the default from studio, which is compounding ID and VARIANT like so: APOLLO_GRAPH_ID@APOLLO_GRAPH_VARIANT . Using APOLLO_GRAPH_ID and APOLLO_GRAPH_VARIANT still works, but using both REF and VARIANT variables together was what made it fail.
Sorry for the confusion, weāll be updating the tutorial and the description snippets in studio to state 3 variables and not 4 shortly.
Heroku is currently not allowing Github integration (Heroku Status) so most of the Lift-Off 5 work needs to be completed using some other service - FYI
Hi @boggsey! Thank you so much for bringing this to our attention!
It looks like there are no updates on Herokuās side on when they expect the GitHub integration to be fixed, so weāve gone ahead and added a few notes in Lift-off V detailing alternate instructions for deployment using the Heroku CLI. This change should be live shortly!
Hi all, Iām experiencing this same error but with the client app. The server app is up and running in prod, no issues. I followed the instructions with client, replaced the apollo client uri with my prod server, and deployment succeeds. But I get the same app error as pictured up top, in the inspector itās a 503 for the client url and the favicon.
Complete heroku logs:
2022-04-21T02:11:36.482152+00:00 app[web.1]: - /app/node_modules/watchpack/lib/watcherManager.js
2022-04-21T02:11:36.482152+00:00 app[web.1]: - /app/node_modules/watchpack/lib/watchpack.js
2022-04-21T02:11:36.482152+00:00 app[web.1]: - /app/node_modules/webpack/lib/node/NodeWatchFileSystem.js
2022-04-21T02:11:36.482153+00:00 app[web.1]: - /app/node_modules/webpack/lib/node/NodeEnvironmentPlugin.js
2022-04-21T02:11:36.482153+00:00 app[web.1]: - /app/node_modules/webpack/lib/webpack.js
2022-04-21T02:11:36.482153+00:00 app[web.1]: - /app/node_modules/react-scripts/scripts/start.js
2022-04-21T02:11:36.482153+00:00 app[web.1]: chokidar@2: Error: Cannot find module 'watchpack-chokidar2'
2022-04-21T02:11:36.482154+00:00 app[web.1]: Require stack:
2022-04-21T02:11:36.482154+00:00 app[web.1]: - /app/node_modules/watchpack/lib/chokidar.js
2022-04-21T02:11:36.482154+00:00 app[web.1]: - /app/node_modules/watchpack/lib/DirectoryWatcher.js
2022-04-21T02:11:36.482154+00:00 app[web.1]: - /app/node_modules/watchpack/lib/watcherManager.js
2022-04-21T02:11:36.482154+00:00 app[web.1]: - /app/node_modules/watchpack/lib/watchpack.js
2022-04-21T02:11:36.482155+00:00 app[web.1]: - /app/node_modules/webpack/lib/node/NodeWatchFileSystem.js
2022-04-21T02:11:36.482155+00:00 app[web.1]: - /app/node_modules/webpack/lib/node/NodeEnvironmentPlugin.js
2022-04-21T02:11:36.482155+00:00 app[web.1]: - /app/node_modules/webpack/lib/webpack.js
2022-04-21T02:11:36.482155+00:00 app[web.1]: - /app/node_modules/react-scripts/scripts/start.js
2022-04-21T02:11:36.482155+00:00 app[web.1]:
2022-04-21T02:11:36.482155+00:00 app[web.1]: at Object.<anonymous> (/app/node_modules/watchpack/lib/chokidar.js:17:7)
2022-04-21T02:11:36.482156+00:00 app[web.1]: at Module._compile (node:internal/modules/cjs/loader:1103:14)
2022-04-21T02:11:36.482156+00:00 app[web.1]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
2022-04-21T02:11:36.482156+00:00 app[web.1]: at Module.load (node:internal/modules/cjs/loader:981:32)
2022-04-21T02:11:36.482156+00:00 app[web.1]: at Function.Module._load (node:internal/modules/cjs/loader:822:12)
2022-04-21T02:11:36.482157+00:00 app[web.1]: at Module.require (node:internal/modules/cjs/loader:1005:19)
2022-04-21T02:11:36.482157+00:00 app[web.1]: at require (node:internal/modules/cjs/helpers:102:18)
2022-04-21T02:11:36.482157+00:00 app[web.1]: at Object.<anonymous> (/app/node_modules/watchpack/lib/DirectoryWatcher.js:9:16)
2022-04-21T02:11:36.482157+00:00 app[web.1]: at Module._compile (node:internal/modules/cjs/loader:1103:14)
2022-04-21T02:11:36.482158+00:00 app[web.1]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
2022-04-21T02:11:36.501058+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=GET path="/" host=bb-client-catstronauts.herokuapp.com request_id=513e2019-23d8-4bda-915f-b0bdd37239bd fwd="68.175.91.109" dyno=web.1 connect=0ms service=22831ms status=503 bytes=0 protocol=https
2022-04-21T02:11:36.617318+00:00 heroku[web.1]: Process exited with status 1
2022-04-21T02:11:36.739539+00:00 heroku[web.1]: State changed from up to crashed
2022-04-21T02:11:36.748866+00:00 heroku[web.1]: State changed from crashed to starting
2022-04-21T02:11:48.629255+00:00 heroku[web.1]: Starting process with command `npm start`
2022-04-21T02:11:50.571642+00:00 app[web.1]:
2022-04-21T02:11:50.571650+00:00 app[web.1]: > catstronauts-client-complete@1.0.0 start
2022-04-21T02:11:50.571650+00:00 app[web.1]: > react-scripts start
2022-04-21T02:11:50.571651+00:00 app[web.1]:
2022-04-21T02:11:55.651474+00:00 app[web.1]: ā¹ ļ½¢wdsļ½£: Project is running at http://172.16.40.166/
2022-04-21T02:11:55.651868+00:00 app[web.1]: ā¹ ļ½¢wdsļ½£: webpack output is served from
2022-04-21T02:11:55.652075+00:00 app[web.1]: ā¹ ļ½¢wdsļ½£: Content not from webpack is served from /app/public
2022-04-21T02:11:55.655978+00:00 app[web.1]: ā¹ ļ½¢wdsļ½£: 404s will fallback to /
2022-04-21T02:11:55.656449+00:00 app[web.1]: Starting the development server...
2022-04-21T02:11:55.656449+00:00 app[web.1]:
2022-04-21T02:11:55.994027+00:00 heroku[web.1]: State changed from starting to up
2022-04-21T02:11:56.182318+00:00 app[web.1]: Browserslist: caniuse-lite is outdated. Please run:
2022-04-21T02:11:56.182330+00:00 app[web.1]: npx browserslist@latest --update-db
2022-04-21T02:11:56.182331+00:00 app[web.1]:
2022-04-21T02:11:56.182332+00:00 app[web.1]: Why you should do it regularly:
2022-04-21T02:11:56.182333+00:00 app[web.1]: https://github.com/browserslist/browserslist#browsers-data-updating
2022-04-21T02:12:28.228963+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=GET path="/favicon.ico" host=bb-client-catstronauts.herokuapp.com request_id=e1deeb24-7121-4321-abba-6f11b032dcd0 fwd="68.175.91.109" dyno=web.1 connect=5000ms service=30000ms status=503 bytes=0 protocol=https
2022-04-21T02:12:52.886005+00:00 app[web.1]: Compiled successfully!
2022-04-21T02:12:52.886436+00:00 app[web.1]:
2022-04-21T02:12:52.886496+00:00 app[web.1]: You can now view catstronauts-client-complete in the browser.
2022-04-21T02:12:52.886524+00:00 app[web.1]:
2022-04-21T02:12:52.886558+00:00 app[web.1]: Local: http://localhost:31159
2022-04-21T02:12:52.886591+00:00 app[web.1]: On Your Network: http://172.16.40.166:31159
2022-04-21T02:12:52.886612+00:00 app[web.1]:
2022-04-21T02:12:52.886629+00:00 app[web.1]: Note that the development build is not optimized.
2022-04-21T02:12:52.886775+00:00 app[web.1]: To create a production build, use npm run build.
2022-04-21T02:12:52.886829+00:00 app[web.1]:
2022-04-21T02:12:52.898629+00:00 app[web.1]: /app/node_modules/watchpack/lib/chokidar.js:17
2022-04-21T02:12:52.898631+00:00 app[web.1]: throw new Error(
2022-04-21T02:12:52.898631+00:00 app[web.1]: ^
2022-04-21T02:12:52.898632+00:00 app[web.1]:
2022-04-21T02:12:52.898632+00:00 app[web.1]: Error: No version of chokidar is available. Tried chokidar@2 and chokidar@3.
2022-04-21T02:12:52.898633+00:00 app[web.1]: You could try to manually install any chokidar version.
2022-04-21T02:12:52.898633+00:00 app[web.1]: chokidar@3: Error: Cannot find module 'chokidar'
2022-04-21T02:12:52.898634+00:00 app[web.1]: Require stack:
2022-04-21T02:12:52.898634+00:00 app[web.1]: - /app/node_modules/watchpack/lib/chokidar.js
2022-04-21T02:12:52.898635+00:00 app[web.1]: - /app/node_modules/watchpack/lib/DirectoryWatcher.js
2022-04-21T02:12:52.898635+00:00 app[web.1]: - /app/node_modules/watchpack/lib/watcherManager.js
2022-04-21T02:12:52.898635+00:00 app[web.1]: - /app/node_modules/watchpack/lib/watchpack.js
2022-04-21T02:12:52.898636+00:00 app[web.1]: - /app/node_modules/webpack/lib/node/NodeWatchFileSystem.js
2022-04-21T02:12:52.898636+00:00 app[web.1]: - /app/node_modules/webpack/lib/node/NodeEnvironmentPlugin.js
2022-04-21T02:12:52.898636+00:00 app[web.1]: - /app/node_modules/webpack/lib/webpack.js
2022-04-21T02:12:52.898636+00:00 app[web.1]: - /app/node_modules/react-scripts/scripts/start.js
2022-04-21T02:12:52.898637+00:00 app[web.1]: chokidar@2: Error: Cannot find module 'watchpack-chokidar2'
2022-04-21T02:12:52.898637+00:00 app[web.1]: Require stack:
2022-04-21T02:12:52.898638+00:00 app[web.1]: - /app/node_modules/watchpack/lib/chokidar.js
2022-04-21T02:12:52.898638+00:00 app[web.1]: - /app/node_modules/watchpack/lib/DirectoryWatcher.js
2022-04-21T02:12:52.898638+00:00 app[web.1]: - /app/node_modules/watchpack/lib/watcherManager.js
2022-04-21T02:12:52.898639+00:00 app[web.1]: - /app/node_modules/watchpack/lib/watchpack.js
2022-04-21T02:12:52.898639+00:00 app[web.1]: - /app/node_modules/webpack/lib/node/NodeWatchFileSystem.js
2022-04-21T02:12:52.898639+00:00 app[web.1]: - /app/node_modules/webpack/lib/node/NodeEnvironmentPlugin.js
2022-04-21T02:12:52.898639+00:00 app[web.1]: - /app/node_modules/webpack/lib/webpack.js
2022-04-21T02:12:52.898640+00:00 app[web.1]: - /app/node_modules/react-scripts/scripts/start.js
2022-04-21T02:12:52.898640+00:00 app[web.1]:
2022-04-21T02:12:52.898640+00:00 app[web.1]: at Object.<anonymous> (/app/node_modules/watchpack/lib/chokidar.js:17:7)
2022-04-21T02:12:52.898640+00:00 app[web.1]: at Module._compile (node:internal/modules/cjs/loader:1103:14)
2022-04-21T02:12:52.898641+00:00 app[web.1]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
2022-04-21T02:12:52.898641+00:00 app[web.1]: at Module.load (node:internal/modules/cjs/loader:981:32)
2022-04-21T02:12:52.898641+00:00 app[web.1]: at Function.Module._load (node:internal/modules/cjs/loader:822:12)
2022-04-21T02:12:52.898642+00:00 app[web.1]: at Module.require (node:internal/modules/cjs/loader:1005:19)
2022-04-21T02:12:52.898642+00:00 app[web.1]: at require (node:internal/modules/cjs/helpers:102:18)
2022-04-21T02:12:52.898642+00:00 app[web.1]: at Object.<anonymous> (/app/node_modules/watchpack/lib/DirectoryWatcher.js:9:16)
2022-04-21T02:12:52.898643+00:00 app[web.1]: at Module._compile (node:internal/modules/cjs/loader:1103:14)
2022-04-21T02:12:52.898643+00:00 app[web.1]: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1157:10)
2022-04-21T02:12:53.472392+00:00 heroku[web.1]: Process exited with status 1
2022-04-21T02:12:53.554913+00:00 heroku[web.1]: State changed from up to crashed
2022-04-21T02:15:14.491710+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=bb-client-catstronauts.herokuapp.com request_id=9af15f60-14af-405d-aef4-fb3bf9b488c5 fwd="68.175.91.109" dyno= connect= service= status=503 bytes= protocol=https
2022-04-21T02:15:14.757612+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=bb-client-catstronauts.herokuapp.com request_id=0d3f9e4e-0c8e-40d1-be66-1f422cda77ee fwd="68.175.91.109" dyno= connect= service= status=503 bytes= protocol=https
So far Iāve tried the following:
add chokidar and watchpack-chokidar2 as dependencies
add .npm to gitignore and removing it from tracking
add āhomepageā: ā./ā to package.json
delete āauthorā value from package.json (on a whim, mentioned as a possibility in a previous comment)
Any pointers appreciated. Really loved this course. Such a bummer to run into a blocker on the very last task.
Hi @lpisgood ! Thank you for the info - weāll try to get this solved so you can get your certification! Almost there!
First, Heroku is currently having issues with its GitHub integration. Weāve updated the course to include using the Heroku CLI instead to deploy your app. Have you used that approach? Youāll see the instructions in this lesson, under the āLearn more: Using the Heroku CLIā section.
Iād also try deleting node_modules and doing a fresh npm install in the client folder before pushing it up to Heroku.
Yeah, I saw the messaging about Heroku and GitHub integration, so I followed the instructions for Heroku CLI. No issues with the server. And seemingly no issues with the client (eg: it builds and deploys with success message) until I tried to actually access the site.
I did manage to resolve the issue just now after digging a bit and finding this thread:
Instructions in case anyone is having the same problem:
Install serve:
npm install serve --s
and update the scripts in package.json as follows: